UINavigationController provides a dynamic stack of views created at run time with a navigation bar at the top. For many applications this is used to provide all of the views the user sees. Useful Documentation iOS Reference Adding To A Project Create an App as normal with the main view XIB Create at least 1 […]
Category: Window, UIViewController etc
Graphics(1)
iPad Specific View Controllers(2)
Navigation Bar(2)
Orientation(3)
Screen Size(1)
Scrolling Views(1)
Storyboards(6)
Subviews(2)
xib based View Controllers(1)
View Background General
Set Background Color [[self view] setBackgroundColor:[UIColor redColor]];
Rotation
See also 'Notifications' Default Rotation In the applicaitons Info.plist add the row: Initial Interface Orientation (UIInterfaceOrientation) Enabling Auto Rotation For A View Add to #ViewController.m //********** SHOULD AUTOROTATE ********** – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { //Set which orientations we allow if ( (toInterfaceOrientation == UIInterfaceOrientationPortrait) || (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) || (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) ) […]
UITabBarController
Applications use tab bar controllers to manage multiple distinct interfaces, each of which consists of any number of custom views and view controllers. For many applications the UITabBarController is used to provide all of the views the user sees. Useful Documentation iOS Reference Creating Multi UITabBarController Views Application Create an App as normal with the […]
Sideways Scrolling View
Create Sideways Scrolling View Of Multiple Pages This could be for a single page ap or as one of the views within say a UITabBarController //********** LOAD VIEW ********** – (void)loadView { //—– CREATE SCROLL VIEW —– CGRect frame = [[UIScreen mainScreen] applicationFrame]; UIScrollView *sv = [[[UIScrollView alloc] initWithFrame:frame] autorelease]; //Create Page View frame.origin.y = […]
Methods you can use with UIViewController
The following superclass methods may be added to a #ViewController.m file //******************************* //******************************* //********** LOAD VIEW ********** //******************************* //******************************* //View being loaded (happens only when view is initially loaded or reloaded in memory) – (void)loadView { [super loadView]; } //*********************************** //*********************************** //********** VIEW DID LOAD ********** //*********************************** //*********************************** //View has loaded (happens only when view […]
Window and Views General
Good Resources Apple View Programming Guide Control Sizes The minimum recommended size of a tappable UI element is 44×44 pixels. Background Color [[self view] setBackgroundColor:[UIColor blueColor]]; Background Image UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@”background.png”]]; [self.view addSubview:background]; [background release]; Positioning Views This example moves a view down below the status bar: [self view].frame = CGRectMake(0, […]
Redraw Of The Window
In the same way that autorelease doesn’t occur until all of the current events and functions have been completed for your application, although the window and it’s object may be marked to be re-drawn it will not occur until the application returns to the background run loop. At this point the OS checks to see […]