对于我的自定义单元格,举个简单的例子,我只有一个 UITextField
,有没有办法让 刚刚插入的单元格
?becomeFirstResponder
insertRowsAtIndexPaths
我需要一种方法来检测这一点,以便在插入后和插入动画结束时成为第一响应者。
有什么想法,甚至接近吗?
谢谢
像这样的东西??
- (void) insertRows
{
.
.
.
[tableView beginUpdates];
[tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationRight];
[tableView endUpdates];
NSIndexPath p = [indexPaths lastObject];
MyCustomCell *cell = [cellForRowAtIndexPath:p];
[cell.textField becomeFirstResponder];
}
关于ios - 检测插入的单元格,然后让它成为FirstResponder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15926205/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) | Powered by Discuz! X3.4 |