测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2017 年 1 月 |
由 Anton Bukov 维护。
在 UITableViewController 内动态隐藏静态 UITableView 中的行和分区。
只需
pod 'ABStaticTableViewController'
或将这些文件包含到您的项目中
用以下代码替换 MyTableViewController.h
中的代码:
@interface MyTableViewController : UITableViewController
与以下代码
@interface MyTableViewController : ABStaticTableViewController
现在您可以调用这些方法来执行非动画和动画的行和分区删除和插入操作
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths;
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths;
- (void)insertSections:(NSIndexSet *)sections;
- (void)deleteSections:(NSIndexSet *)sections;
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths
withRowAnimation:(UITableViewRowAnimation)animation;
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths
withRowAnimation:(UITableViewRowAnimation)animation;
- (void)insertSections:(NSIndexSet *)sections
withRowAnimation:(UITableViewRowAnimation)animation;
- (void)deleteSections:(NSIndexSet *)sections
withRowAnimation:(UITableViewRowAnimation)animation;
ABStaticTableViewController 采用 MIT 许可证发布。