iOS 7中的状态栏和导航栏问题
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0f){ CGRect frame = self.navigationController.view.frame; if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { frame.origin.y = 20; } else { frame.origin.x = 20; } [self.navigationController.view setFrame:frame];}
ZBarReaderViewController *reader = [ZBarReaderViewController new];reader.readerDelegate = self; if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) reader.supportedOrientationsMask = ZBarOrientationMaskLandscape;else reader.supportedOrientationsMask = ZBarOrientationMaskPortrait; [self presentModalViewController:reader animated:YES];
犯罪嫌疑人X