- The biggest difference in ipad development is the adaptation of the onscreen controls to the iphone and the rotation of the screen.
- Storyboard in the Sizeclass of the screen configuration, also does not support the development of the ipad.
1. In the controller to get the direction of rotation of the device in IOS8 and later, the screen only after the rotation screen size, no longer the direction of the rotation of the expired.
- How to get the screen rotation direction in iOS7 and before
/**//uiinterfaceorientation, screen orientation Uiinterfaceorientationunknown = Uideviceorientationunknown, uiinterfaceorientationportrait = uideviceorientationportrait, Uiinterfaceorientationportraitupsidedown = Uideviceorientationportraitupsidedown, Uiinterfaceorientationlandscapeleft = Uideviceorientationlandscaperight, Uiinterfaceorientationlandscaperight = Uideviceorientationlandscapeleft */-(void) Willanimaterotationtointerfaceorientation: (uiinterfaceorientation) tointerfaceorientation duration :(nstimeinterval) duration{//will be rotated to perform the animation NSLog (@ "%s", __func__);} -(void) Willrotatetointerfaceorientation: (uiinterfaceorientation) tointerfaceorientation Duration: ( Nstimeinterval) duration{//will be rotated NSLog (@ "%s", __func__);}
After iOS8, the screen is only the screen, that is, when the screen is wide and high is the horizontal screen, or vertical screen.
- ipad screen only (1024 * 768) Horizontal screen
- (768 * 1024) Vertical screen
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator{ // 1.判断是否是横屏 BOOL isLandscape = size.width == 1024; // 2.设置Dock的宽度和高度 // 获取屏幕旋转动画执行的时间 CGFloat duration = [coordinator transitionDuration]; [UIView animateWithDuration:duration animations:^{ }];}
The way and style of modal pop-up controller in 2.iPad modal common there are 4 rendering style controller properties Modalpresentationstyle
ipad Development Brief Introduction