I want to know why there´s no console output when testing on the iOS simulator by tracing that code in my UIViewController – it only traces by testing on a device.
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
NSLog(@"willRotateToInterfaceOrientation: ", toInterfaceOrientation);
}
And how do i print out that UIInterfaceOrientation value (type of enum)?
Would be great to get your help on that..Thanks
Where is your format specifier?
UIInterfaceOrientationis atypedef enum, not an object, so you cannot use%@as the format specifier.Should look like this:
If you really need this kind of “pretty print” functionality, you can run it through a
switch, like this: