You can not set to nil the imageOrientation since it's not an object. You could find it in the UIImage header definition file and you'll find it's defined as a NSInteger
typedef NS_ENUM(NSInteger, UIImageOrientation)
Apart from being a NSInteger the property associate to it is readonly, which means you can not change it directly through setter method:
@property(nonatomic,readonly) UIImageOrientation imageOrientation;
UIImageOrientationUp is the default orientation for UIImage, what you could do is to create a new image with the orientation you want to use/prefer using for example:
+ (UIImage *)imageWithCGImage:(CGImageRef)cgImage scale:(CGFloat)scale orientation:(UIImageOrientation)orientation NS_AVAILABLE_IOS(4_0);