Preface
September 20, formally push the official version of Xcode 9 and iOS 11, the adaptation of iOS 11 is the first to adapt, many online tutorials, not repeat. The main point here is that the adaptation of the iphone x to the big God level can not be seen, I am speaking here is mainly the basic adaptation work
Summary
Start diagram: 1125 * 2436
StatusBar Height: 44
Tabbar Height: 83
For some older projects, on the start-up diagram, there may be no adaptation of Xib or SB, so one may appear so that the entire project will not fit perfectly.
! [Upload login2_194373.png. . ]
Workaround, configure the start-up diagram directly with Launchscreen.xib or Launchscreen.storyboard in the project settings so that the project will show the full
iPhone X launchimage.png
iPhone X launchimage2.png
Login2.png
There is a drop-down refresh of the tail, the problem is well resolved, in the document is clearly marked
1 @property (nonatomic,assign) BOOL automaticallyadjustsscrollviewinsets Api_deprecated_with_replacement ( " use Uiscrollview ' s contentinsetadjustmentbehavior instead ", iOS (7.0 , 11.0 ), tvOS (7.0 , 11.0 )); // Defaults to YES
contentInsetAdjustmentBehavior
It 's a strange face for us now. This is an enumerated property that is defined in iOS11 for the ScrollView
new one.
Note that the properties of the automaticallyAdjustsScrollViewInsets
English controller are discussed above.
1 typedef ns_enum (Nsinteger, uiscrollviewcontentinsetadjustmentbehavior) {2Uiscrollviewcontentinsetadjustmentautomatic,//Similar to. scrollableaxes, but for backward compatibility would also adjust the top & bottom contentinset when th E Scroll view is owned by a view controller with automaticallyadjustsscrollviewinsets = YES inside a navigation controller , regardless of whether the scroll view is scrollable3Uiscrollviewcontentinsetadjustmentscrollableaxes,//Edges for scrollable axes is adjusted (i.e., Contentsize.width/height > Frame.size.width/height or Alwaysbounceho rizontal/vertical = YES)4Uiscrollviewcontentinsetadjustmentnever,//Contentinset is not adjusted5Uiscrollviewcontentinsetadjustmentalways,//Contentinset is all adjusted by the scroll view ' s safeareainsets6} api_available (iOS (11.0), tvOS (11.0));
in estimatedXXHeight
IOS 11 By default 0 becomes now the default .AutomaticDimension
, resulting in a high-level calculation error, and the resulting phenomenon is UI confusion TableView
when loading more a series of questions such as the height of the view exception.
1 if(@available (IOS11.0, *)) {2_newtableview.contentinsetadjustmentbehavior =Uiscrollviewcontentinsetadjustmentnever;3 //The following is a problem with the TableView height calculation4_newtableview.estimatedrowheight =0;5_newtableview.estimatedsectionheaderheight=0;6_newtableview.estimatedsectionfooterheight=0;7 8}Else{9Self.automaticallyadjustsscrollviewinsets =NO;Ten}
IOS Navigationbar new features
Navigation
IntegrationUISearchController
Put your UISearchController
assign a value to navigationItem
, you can implement the UISearchController
integration into Navigation
.
1 navigationitem.searchcontroller //iOS 11 new attribute 2// determines whether to hide the search box when sliding; IOS 11 new Properties
@property (Nonatomic, retain, nullable) Uisearchcontroller *searchcontroller api_available (iOS (11.0)) Api_ Unavailable (tvOS);
Summary:
IOS11 system change is still relatively large, some places need to pay attention to the adaptation, otherwise there will be very strange phenomenon. For the time being, there are so many pits in iOS11 that we will continue to share them later.
The first time to write an article, thanks for your attention
Reference:
What developers need to know about iOS SDK new features
IOS 11 navigation Bar Height Customization
IOS One uikitの slew more points
Original address: Http://www.jianshu.com/p/fed93b411eb6
IOS 11 and IPhone x fit those things