Add the devices to be used for development in ‘Certificates’ In Macintosh HD > Applications > Utilities > Keychain Access Menu > Keychain Access > Preferences > Certificates > set Online Certificate Status Protocol (OSCP) and Certificate Revocation List (CRL) to “Off”. Menu > Keychain Access > Certificate Assistant > Request a Certificate from a […]
All posts by
Distributing An Application for Testing
See here
Detect if device is iPad or iPhone
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { NSLog(@”This is an iPhone”); } else { NSLog(@”This is an iPad”); }
Create class based on an existing class
This example demonstrates a new class being created based on the Table View Cell class
Table Cell Class With Controlled Left Image
This example is based on a solution given here and allows the left image of a table cell to be customized. In #ViewController.h @end //************************************************** //************************************************** //********** CLASS FOR BESPOKE TABLE CELL ********** //************************************************** //************************************************** @interface SizableImageCell : UITableViewCell {} @end In #ViewController.m //********************************* //***** DEFINE CELL FOR A ROW ***** //********************************* – (UITableViewCell *)tableView:(UITableView *)tableView […]
Detect Touch In Sub View
Allowing a sub view to detect a touch within it //SETUP TO RECEIVE TAPS UITapGestureRecognizer *singleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; singleTapGestureRecognizer.numberOfTapsRequired = 1; [self.view addGestureRecognizer:singleTapGestureRecognizer]; //********** VIEW TAPPED ********** -(void) handleSingleTap:(UITapGestureRecognizer *)sender { NSLog(@”Touched”); }
Adding Subviews Programmatically
Create the Sub View Create a view as normal Menu > File > New File > iOS > Cocao Touch > UIViewControllerSubClass Subclass of > UIViewController With XIB for user interface = Checked Name it (“#ViewController”, ending with “_iPhone” and “_iPad” for multi device apps, is a good naming convention) In interface builder select the […]
Adding Navigation Bar
Interface Builder Navigation Bar Setting The “Simulated Metrics” don’t actually alter the status bar, navigation bar etc, it just simulates the size and colour of them for you so that you can layout your views without having to shift everything down. Adding Navigation Bar Based View Controller In AppDelegate_iPhone.h @interface AppDelegate_iPhone : AppDelegate_Shared { UINavigationController […]
Status Bar
Dealing With Status Bar Post iOS7 Good guide here Setting Status bar text white Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file. In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate]; Add the following method: -(UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent; } Status Bar Size 20 pixels Interface Builder Status Bar Setting The "Simulated Metrics" don't actually alter […]
Upgrading An App On A Device Without Affecting An Installed Release Version
Debug On Device Running Release Version Of An App To be able to debug on a device that is already running the release version of an app you now want to develop further and run on it you can do this to avoid the release version being affected: Change the “Bundle Identifier” in your “myprojectname-Info.plist” […]