iphone - No scrolling occurs when UITableView scrollToRowAtIndexPath is invoked -


itemprop = "text">

There is a simple table view in my view that has 6 rows and a button, which is called doScroll < / Code>. My purpose for doScroll () is to scroll up to 5th cell as if it is at the top of the table view.

  - (zero) doScroll: (ID) sender {NSIndexPath * index = [NSIndexPath indexFoforRO: 4 in particular: 1]; [M_ tableView scrollToRowAtIndexPath: Index ScrollPosition: UITWebScrollPosition Animated: Yes]; }  

However when the doScroll is applied, the tableclose scroll is only slightly I suspect that it has something to do with the size of the scroll view So before trying to scroll, I tried to increase the height of m_tableview.contentsize after doing this, though I do not have any scrolling at all ...

The visual controller is a simple UIViewController And refers to the table view through the IBOutlet. For some reason, scrolling works as expected for the default navigation based application, where the controller is a UITableViewController.

UITableView will prevent you from scrolling out the spaces. Add enough valid ingredients to the bottom of the table so that the cells can scroll up. Use the table's limit to reduce the height of the cell for a more accurate frame:

  myTable.tableFooterView = [[[UIView alloc] initWithFrame: CGRactMake (0,0,320,480) AutoCare] ;  

You can also use the contentInset property's below .


Comments