A great way of placing a new view over the top of a TabBarController etc which uses the whole screen (except for the status bar is there is one) so it looks as though the tab bar etc has gone. Typical Use //Display modal view #ViewController_iPhone *vc1 = [[#ViewController_iPhone alloc] init]; [self presentModalViewController:vc1 animated:YES]; [vc1 […]
All posts by
UIPopoverController
Useful Documentation iOS Reference
UISplitViewController
Useful Documentation iOS Reference
Table Design
Good resources iOS Reference http://www.shrinkrays.net/articles/monotouch-controllers-by-example/uitableviewcontroller-by-example.aspx Creating A Table View ViewController These instructions include the table view option when creating the view controller files and provide a simpler means that adding a table view to a typical view controller (although there isn’t actually much difference between the two if creating a basic table view). Menu > […]
Downloading a file
Example of downloading a file and saving it in a directory in Documents In the .h file @interface AppMain : NSObject //-ADD THIS DELEGATE { FileDownloader *fileDownloader1; //-ADD THIS In the .m file //********** DOWNLOAD FILE ********** – (void) SomeMethodName { NSLog(@”STARTING DOWNLOAD”); if (!fileDownloader1) fileDownloader1 = [[FileDownloader alloc] init]; [fileDownloader1 setDelegate:self]; [fileDownloader1 DownloadFile:@”http://www.somedomain.com/somefile.html”]; } […]
Parsing an XML file
A complete example of parsing an XML file In the.h file @interface AppMain : NSObject <NSXMLParserDelegate> //- ADD THIS DELEGATE { NSMutableString *xmlString; //-ADD THIS STRING In the.m file //********** PARSE XML FILE ********** – (void) SomeMethodName:(NSData *)file { //—– PARSE THE XML —– NSXMLParser *parser = [[NSXMLParser alloc] initWithData:file]; [parser setDelegate:self]; [parser parse]; //We […]
String Format Specifiers
http://developer.apple.com/iphone/library/documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
Triggering Device Functions
Open a webpage in safari [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”http://www.google.com”]]; Call a telephone number [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”tel:0044-1234-567-890″]];
Labels As Links
UILabels don't have methods for triggering events when they are clicked so you can detect a click manually from the touch event In #ViewController.h IBOutlet UIView *mainView; IBOutlet UILabel *UrlLabel; In interface builder Right click Files Owner. Drag the mainView outlet onto the view. Drag the UrlLabel outlet onto the label In #ViewController.m to open […]
Renaming A ViewController
Renaming A View Controller See here Renaming A Set Of View Files Rename the .h, .m and .xib files Update the name in the following places: In #ViewController.h update @interface In #ViewController.m update #import @implementation In #ViewController.xib update Select the Files Owner icon on the left, then the Identity Inspector tab and rename the […]