UISearchBar height on iOS8 when showsScopeBar=YES

后端 未结 4 992
不思量自难忘°
不思量自难忘° 2020-12-29 10:53

I\'m using UISearchBar in my app, with showsScopeBar=YES. When running under iOS8 (both in the simulator and on a device) the scope bar is hidden a

4条回答
  •  执念已碎
    2020-12-29 11:32

    This seems to be not an iOS 8 bug but a Xcode 6 GM compiled Storyboard bug as it happens on iOS 6/7 as well.

    As suggested it is fixed by calling sizeToFit on the search bar in viewWillAppear.

    If you want to do it from a view instead of a controller you can try to place it inside willMoveToWindow.


    This bug seems to affect Xcode 5.x builds on iOS 8 and Xcode 6 GM builds on all systems.

提交回复
热议问题