ITeye博客

tableview设置上下滚动高度,启用删除

zcw_java · 2013-08-06 17:14 · iPhone开发 · 移动开发 · Markdown

可在viewDidAppear中实现加入 [tablvew setContentOffset:CGPointMake(0,480) animated:YES];
在tableView内添加一个searchbar,一起滚动;开始时隐藏headerView(即让tableView向上滚动headerView的高度:默认44)
UISearchBar *mySearchBar = init];
;

tableView.tableHeaderView = mySearchBar;
//UITableView开始滚动到的位置(这样一开始headerView是不显示的)
;

//启用删除

  • (void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath { CustomAlarmCell cell = (CustomAlarmCell); ; ; ; }

  • (void)tableView:(UITableView*)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath { CustomAlarmCell cell = (CustomAlarmCell); ; ; ; }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。