Http://s.p.qq.com/pub/show?p=82e0c8d9&id=4f6fdb7610fed&plg_auth=1&pt=4&puin=2195769561&idx =1&ST=32014 Year April 14
Antonyzhao (Zhao) SNG Product Dept. \ Platform Development Group deputy leader
Iviewcontroller layout
The wantsfullscreenlayout has been voided and replaced by
1, Edgesforextendedlayout
This property is the Uiextendededge type, which is used to define which side of the view needs to be expanded. For example, Uirectedgetop, which extends the top of the view area to StatusBar (formerly Navigationbar), Uirectedgebottom is to extend the bottom of the area to the lower edge of the screen. The default value is Uirectedgeall.
2, Extendedlayoutincludesopaquebars
If you use an opaque navigation bar, set the value of Extendedlayoutincludesopaquebars to No when setting Edgesforextendedlayout (the default is YES).
3, Automaticallyadjustsscrollviewinsets
When yes, it will look for the ScrollView in the view and set the ScrollView's contentinset to {64, 0, 0, 0}. If you do not want the content of ScrollView to be automatically adjusted, set this property to No (the default is YES).
QQ is currently overloaded with the Wantsfullscreenlayout attribute method:
#if __iphone_os_version_max_allowed >= 70000
-(void) Qqsetwantsfullscreenlayout: (BOOL) wantsfullscreenlayout
{
if (system_version >= 7.0) {
if (wantsfullscreenlayout = = NO) {
Self.automaticallyadjustsscrollviewinsets = NO;
Self.extendedlayoutincludesopaquebars = NO;
Self.edgesforextendedlayout = Uirectedgeleft | Uirectedgebottom | Uirectedgeright;
} else {
Self.automaticallyadjustsscrollviewinsets = NO; Recommended Manual Setup
Self.extendedlayoutincludesopaquebars = NO;
Self.edgesforextendedlayout = Uirectedgeall;
}
}
[Self qqsetwantsfullscreenlayout:wantsfullscreenlayout];
}
#endif
Qqviewcontroller at initialization, Self.wantsfullscreenlayout=no. That is
Self.automaticallyadjustsscrollviewinsets = NO;
Self.extendedlayoutincludesopaquebars = NO;
Self.edgesforextendedlayout = Uirectedgeleft | Uirectedgebottom | Uirectedgeright;
· The view structure of the Uitabbarcontroller has changed
IOS7 below, Uitransitionview and Uitabbar are not overlapping. The iOS7 two view can overlap one another. This affects the implementation mechanism of our custom Tabbar (see how Qqtabbarcontroller is implemented).
· IOS7 's UITableViewCell
1, iOS7 under the cell BackgroundColor for Whitecolor, to be manually set to Clearcolor.
2, previously can directly inherit UITableViewCell and then DrawRect. But now, UITableViewCell contains a scrollview, you redraw the UITableViewCell will be covered by this scrollview and completely unable to display. And don't try to get the subview through [Cell.contentview Viewwithtag].
3. If you set Backgroundview and Selectedbackgroundview, sliding Delete will find that Backgroundview will move right until the delete button is overwritten. The current solution is to reset the frame of Backgroundview and Selectedbackgroundview in the cell Layoutsubviews method:
-(void) layoutsubviews
{
[Super Layoutsubviews];
#if __iphone_os_version_max_allowed >= 70000
if (system_version >= 7.0) {
Self.backgroundView.frame = Self.bounds;
Self.selectedBackgroundView.frame = Self.bounds;
}
#endif
}
4, the index background bar backgroundcolor default is Whitecolor, to change it to Clearcolor:
[[UITableView appearance] Setsectionindexbackgroundcolor:[uicolor Clearcolor]];
Corresponding TAPD BUG:
http://tapd.oa.com/v3/10066451/bugtrace/bugs/view?bug_id=1010066451048986804&url_cache_key= 74876e4d2f0fea09480c42284f702c98
· IOS7 based on Viewcontroller hidden status bar
Returns an enumeration value using the Viewcontroller overloaded method to control the hiding and styling of the status bar.
First, you need to add the key: Uiviewcontrollerbasedstatusbarappearance in the Info.plist configuration file, and set it to Yes;
Then, implement the following two methods in the Uiviewcontroller subclass:
-(Uistatusbarstyle) Preferredstatusbarstyle
{
return uistatusbarstylelightcontent;
}
-(BOOL) Prefersstatusbarhidden
{
return NO;
}
Finally, when the status bar style needs to be refreshed, the [self setneedsstatusbarappearanceupdate] method is called to refresh.
QQ is currently set Uiviewcontrollerbasedstatusbarappearance to No, and then according to the theme configuration of the uniform settings StatusBar style
· Uinavigationbar and Uinavigationbaritem
1. Under IOS7, if you set a background chart that is larger than 88 pixels, it will automatically stretch to the status bar. (White skin transduction a bit bug, background image height is 89 pixels)
2. If Uinavigationbaritem is a custom customview, the effect is as follows
The button leaves a lot of space on the left (right). The current solution is to add a width of-10 to the left of Leftbarbuttonitem (Rightbarbuttonitem), Barbuttonsystemitem is the uibarbuttonitem of Uibarbuttonsystemitemfixedspace. The reference code is in UINAVIGATIONITEM+SWIZZLEMETHOD.M.
· Uisearchbar and Uisearchdisplaycontroller
1. Test when testing iOS7 SDK compatibility, there is a confusing line between the navigation bar and the search box:
After the debug analysis, the former Uisearchbar has several sub-view, including background map view, input frame view and so on. Now there is only one child view, and the background and input boxes are in this sub view. As the table moves, the frame of this sub-view is constantly changing as the table moves to the top, the frame.origin.y=0.5 of the child view, and the view. Cliptobounds=yes, thus exposing a line at the top of the Viewcontroller background map ...
2, to Uisearchdisplaycontroller set delegate, in Uisearchdisplaycontroller when not used (such as release him before), be sure to Setdelegate = nil. Otherwise, a wild pointer (a disposed object) may be called
Self.searchDisplay.delegate = nil;
· Some things about UILabel, Uitextview and NSString.
1, Sizewithfont, Drawinrect and other nsstring typesetting and drawing interface has been deprecated, replaced by Sizewithattributes, Drawinrect:withattributes.
2, we often first use Sizewithfont to the string layout, and then set the Uilabel frame, in iOS7, the following problems may occur
Uilabel content is not complete, the workaround is to Uilabel call SizeToFit.
3, Uitextview now set text after contentsize return size and frame, so need to use sizethatfits to replace.
• Workaround for IOS6 SDK compilation with new IOS7 SDK features
For example, Uistatusbarstylelightcontent is iOS7 new Statusbarstyle, that is, when writing code, the front plus macro judgment:
#if __iphone_os_version_max_allowed < 70000
[[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstyleblackopaque];
#else
[[UIApplication sharedapplication]setstatusbarstyle:uistatusbarstylelightcontent];
#endif
IOS7 SDK various pits--hand Q Team Summary