Tips & Tricks
Everything you ever wanted to know but never dared to search for...

Prevents a jumpy flip horizontal transition while using a navigation bar

Add the following code in viewDidAppear in the presenting view controller:
[self.navigationController.navigationBar.layer removeAllAnimations];

and dismiss it by using:
[UIView transitionWithView:self.navigationController.view
                  duration:0.75
                   options:UIViewAnimationOptionTransitionFlipFromLeft
                animations:nil
                completion:nil];
[self dismissViewControllerAnimated:YES completion:nil];

How to create a rounded image button

[myButton setImage:myUIImage forState:UIControlStateNormal];
myButton.layer.cornerRadius = myButton.frame.size.width / 2;
myButton.clipsToBounds = YES;
myButton.layer.borderWidth = 3.0f;
myButton.layer.borderColor = [UIColor grayColor].CGColor;

Gaetano Causio © | Privacy Policy | Disclaimer