Monthly Archives: June 2013

XCode – Rename Scheme

You need to click on the scheme button, then hit “Manage Schemes”. Once you do so, you’ll have a window like this:

enter image description here

Select the scheme you want to change, and hit Return.

Now the scheme name will be editable, and you can change it to your hearts desire. Then hit Return again to save it.

UIAlertView – creating and detecting button tap

Declare the UIAlertView delegate in the yourViewController.h:

 

Create the alertView:

 

Detect which alertView button was tapped:

 

UIBarButtonItem – setting retina display and non-retina display toolBar icons

I can never remember how to handle retina display images versus non-retina display images in the toolbar so here’s a reminder:

Add the 2 files to your project:

Then call it the same way on all screen densities:

UIImage will determine the right one to use. If using Interface Builder, point to the image.png and not the @2x image.

UIActivityIndicatorView – add activity indicator to navigation bar

Add an activity indicator as shown here:

Remove the spinner and stop animating: