Ipad and blocks - iPad

6 important questions on Ipad and blocks - iPad

How do you know your "on" an iPad in code?

BOOL ipad = [UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad);

How can a view controller check its view is on screen?

if(self.view.window) ..
If this is not bill, we must be on screen!

Does a UISplitViewController have a property to store view controllers?

Yes: @property (nonatomic, copy)NSArray *viewControllers;
Is always have max 2 of them.
NOTE: a tabBarCOntroller also has an array to store viewControllers!
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

Do you have to set the split views delegate @property?

Yes! otherwise it will not function. We usually do this in awakeFromNib method.

In a split view controller, which 2 "types" of view do we have?

Master, and detail view

What must we do to "make" ousel the split views delegate?

We must "promise" to be the delegate: <UISplitviewControllerDelegate>
and we must "set" ourselves as the delegate: self.splitViewController.delegate = self;
We can do this in "awakaaFromNib" method.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo