How to add a right button to a UINavigationController?

I am trying to add a refresh button to the top bar of a navigation controller with no success. Here is the header: @interface PropertyViewController : UINavigationController { } Here is how I am trying to add it: – (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { UIBarButtonItem *anotherButton = [[UIBarButtonItem … Read more

Finding the direction of scrolling in a UIScrollView?

I have a UIScrollView with only horizontal scrolling allowed, and I would like to know which direction (left, right) the user scrolls. What I did was to subclass the UIScrollView and override the touchesMoved method: – (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; UITouch *touch = [touches anyObject]; float now = [touch locationInView:self].x; float … Read more

‘Missing recommended icon file – The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120′ pixels, in .png format’

I submitted an app update, but I have received an email telling me this error has occurred: Missing recommended icon file – The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120’ pixels, in .png format How can I fix this problem? Here are the current icon requirements from … Read more

Xcode 4 – “Valid signing identity not found” error on provisioning profiles on a new Macintosh install

I had a Macintosh I used to develop iPhone apps with using Xcode 4. I now have a new Macintosh with a new install of… everything. When opening Xcode projects built on the old Mac, I cannot run the app on the iPhone that was configured as a development iPhone. Xcode 4 organizer tells me … Read more