I avoid using macros unless necessary. This works perfectly well
float degrees = 20; //the value in degrees
view.transform = CGAffineTransformMakeRotation(degrees * M_PI/180);
More Related Contents:
- How to find topmost view controller on iOS
- How Do I Take a Screen Shot of a UIView?
- Get to UIViewController from UIView?
- NSAttributedString background color and rounded corners
- How to handle different orientations in iOS
- How to use UIVisualEffectView to Blur Image?
- How to crop a UIImageView to a new UIImage in ‘aspect fill’ mode?
- Proper practice for subclassing UIView?
- How to use UIView autoresizingMask property programmatically?
- Drawing UIBezierPath on code generated UIView
- How to add a touch event to a UIView?
- How to add a border just on the top side of a UIView
- Cut transparent hole in UIView
- How can you rotate text for UIButton and UILabel in Objective-C?
- “From View Controller” disappears using UIViewControllerContextTransitioning
- How to load a xib file in a UIView
- Can UIView be copied?
- Why masksToBounds = YES prevents CALayer shadow?
- Creating a reusable UIView with xib (and loading from storyboard)
- UIView – How to get notified when the view is loaded?
- How to draw a “speech bubble” on an iPhone?
- Dashed line border around UIView
- How do I change the color of the text in a UIPickerView under iOS 7?
- Creating iPhone Pop-up Menu Similar to Mail App Menu
- rotate a UIView around its center but several times
- UIView’s border color in Interface builder doesn’t work?
- How to mimic Keyboard animation on iOS 7 to add “Done” button to numeric keyboard?
- How to connect multiple buttons in a storyboard to a single action?
- Round top corners of a UIView and add border
- Rotating a view in layoutSubviews