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

Xcode 6 beta 2 issue exporting .ipa: “Your account already has a valid iOS distribution certificate”

I’m having trouble exporting an app for Ad Hoc Distribution on Xcode 6 beta 2: When exporting my project for ad hoc development on Xcode 6, I receive this alert. I’ve tried exporting it on Xcode 5 and had no problems at all saving the .ipa. Is anyone experiencing this problem as well? 27 Answers … Read more