手机屏幕适配相关问题
if (UIInterfaceOrientationPortrait==[UIApplicationsharedApplication].statusBarOrientation) {
//设备如果是竖向
}else{
}
(1)获取iphone屏幕大小
CGRectscreenBounds=[[UIScreenmainScreen]bounds];
CGRectscreenRect=[[UIScreenmainScreen]applicationframe];
(2)获取手机唯一ID
UIDevice*device=[UIDevicecurrentDevice];//创建设备对象
NSString*deviceUID=[[NSStringalloc]initWithString:[device uniqueIdentifier]];
NSLog(@"%@",deviceUID);// 输出设备id
(3)显示和隐藏StatsBar
[[UIApplicationsharedApplication]setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
启动隐藏StatusBar�info.plist添加Statusbar is initially hidden为boolYes