O'Reilly logo

RubyMotion by Clay Allsopp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

All About Views and UIView

All of the “stuff” you see and interact with in an app are called views. Each distinct screen is made of dozens of views, from tiny icons to buttons and text entry fields. The base view of an app is called the window, and all other views exist within it. Apps can even have multiple windows, but that’s a little bit beyond our scope.

In code, views are UIView objects; all graphics on the screen are descendants of UIView. The window is a subclass of UIView called UIWindow. When our app starts, we set up a window and then begin adding new views to it. These additional views are known as subviews.

Subviews are visually stacked on top of each other within the parent view. Every view, not just the window, can have subviews. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required