摘要:一 IOS6 IOS5ViewController 旋转二 在旋转中不要使用MainScreen UIWindow 来判断屏幕宽高。通过MainScreen的size 或者UIWindow的frame获得size都是width小于height。如果要在横竖屏中居中,建议使用MainScreen的size的width、height取一半。并且判断是否是横竖屏。
阅读全文
02 2013 档案
摘要:UIViewController* controller1 = [[UIViewControlleralloc]init];UIViewController* controller =self.view.window.rootViewController;controller.modalPresentationStyle=UIModalPresentationCurrentContext;[controllerpresentModalViewController:controller1animated:YES];以上代码是弹出透明背景viewcontroller的code。注意红色code。下
阅读全文
摘要:1UIWebView外侧添加边框要注意边框的宽度一定是偶数。是奇数在某些设备上(低配置)上会上下、左右差一个像素。并且为了展示防止html页面错位,在添加边框后要扩大UIWebView的宽高,扩大的size为边框的宽度。2 UIWebView中如果使用img标签,img的标签wdith、height是按照ios中size大小设置的,就是按照ios的点设置的,不是像素。3 如果要全屏显示,尽量将view添加到viewcontroller中。如果要隐藏statusbar,建议在viewcontroller中控制。
阅读全文