最新更新系统之后发现APP从二级页面返回首页时,会出现UITabBar跳动的问题,无功能性影响,但用户体验不是很好。在网上查到资料修改UITabBar一个属性即可。属性名字:
/*
Default is YES.
You may force an opaque background by setting the property to NO.
If the tab bar has a custom background image, the default is inferred from the alpha
values of the image—YES if it has any pixel with alpha < 1.0
If you send setTranslucent:YES to a tab bar with an opaque custom background image
the tab bar will apply a system opacity less than 1.0 to the image.
If you send setTranslucent:NO to a tab bar with a translucent custom background image
the tab bar will provide an opaque background for the image using the bar's barTintColor if defined, or black
for UIBarStyleBlack or white for UIBarStyleDefault if barTintColor is nil.
*/
@property(nonatomic,getter=isTranslucent) BOOL translucent NS_AVAILABLE_IOS(7_0);
设置该属性为NO,即可解决该问题。
设置前:
output1.gif
设置为NO后,完美解决:
output2.gif
网友评论