Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
508 views
in Technique[技术] by (71.8m points)

uitableview - UIView under UINavigationBar on IOS7

We're working on the transition between IOS6 and IOS7 and have the next issues, for the moment without solution:

The structure of our view is the next one:

  1. UIView
  2. UIToolbar for ad-hoc buttons (filter button for the list)
  3. UISearchBar over the UIToolbar to integrate the search component with the list
  4. UITableView

Working perfectly on the previous versions of the IOS SDK.

But in IOS7 we have the next troubles:

  1. The UIToolbar and UISearch bar is not visible anymore
  2. We integrated the UIRefreshBar component and after refresh the UITableView always move under the UINavigationBar

Any suggestions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  1. In viewDidLoad this worked for me

    [self setEdgesForExtendedLayout:UIRectEdgeNone];

  2. If you like storyboard, select the viewController and make sure Extended Edges >> Under top bars is not selected.

enter image description here


Update: For people like me, who can't install Xcode 5 available only in Mountain Lion:

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
    [self setEdgesForExtendedLayout:UIRectEdgeNone];
#endif

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...