简体   繁体   中英

UITableView landscape scrolling issue

A little background:

My app is designed as a web form in a UITableView. It is similar in format to the iPhone's Settings > Mail,Contacts,Calendars > "Account Name" > Account Info. A few differences: 1) I have a big text box on the bottom where you can put a "message body". 2) I have a big red button underneath the text box, similar to the red "Delete Account" button at Settings > Mail,Contacts,Calendars > "Account Name". the red button button submits the "form".

The view described above fits in a 320 width by 416 height view (in other words, there is no need to scroll in portrait mode including a Nav Bar)

The issue:

When I rotate to landscape, the UITableView cannot scroll to view the entire 416 height. Im stuck at 268 by 480 ( plus nav bar) and the bottom part of the table (part of the text box and the red button) are cut off and hidden below. If you use the scroll "spring-back" you can temporarily see the rest of the view, until you let go.

Other design details

  • Im using UIViewController and adding the UITableView to the view
  • I'm using:

    self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

  • I tried forcing both the view and table to have height of 416 before (viewDidLoad) and after (via notification) rotation. Still can't scroll the UITableView

Does anyone have any suggestions as to what the issue might be or what else to try?

您是否尝试过(您还想删除有关强制视图和表格的高度的内容):

self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM