You would like to present a few options to your users from which they can pick anoption, through a UI that is compact, simple, and easy to understand. effect: 1. declare control #import "ViewController.h" @interface ViewController () @property (…
Presenting and Managing Views with UIViewController ProblemYou want to switch among different views in your application. SolutionUse the UIViewController class. ( Apple’s strategy for iOS development was to use the model-view-controller (MVC) divisio…
ProblemYou want to display an image instead of text as the title of the current view controlleron the navigation controller SolutionUse the titleView property of the view controller’s navigation item - (void)viewDidLoad { [super viewDidLoad]; /* Crea…
ProblemYou would like to directly manipulate the array of view controllers associated with aspecific navigation controller SolutionUse the viewControllers property of the UINavigationController class to access andmodify the array of view controllers…
ProblemYou would like to allow your users to move from one view controller to the other witha smooth and built-in animation. SolutionUse an instance of UINavigationController. What it's like If you’ve used an iPhone, iPod Touch, or iPad before, chanc…
You want to be able to allow your users to share content inside your apps with theirfriends, through an interface, such as Facebook and Twitter. Solution Create an instance of the UIActivityViewController class and share your contentthrough this clas…
Picking the Date and Time with UIDatePicker effect: 1. declaring a property of type UIDatePicker #import "ViewController.h" @interface ViewController () @property (nonatomic, strong) UIDatePicker *myDatePicker; @end @implementation ViewControlle…