摘要:实现Cell的滑动删除, 需要实现UITableView的代理UITableViewDelegate中如下方法://先要设Cell可编辑- (BOOL)tableView:(UITableView*)tableView canEditRowAtIndexPath:(NSIndexPath*)inde...
阅读全文
摘要:代替tableview的reloadData方法(有动画)1 //一个section刷新 2 NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:0]; 3 [tableview reloadSections:indexSet withRo...
阅读全文
摘要:方法一:1234第一步:[self.collectionViewregisterNib:[UINibnibWithNibName:@"QGLShareBtnCell"bundle:nil]forCellWithReuseIdentifier:@"QGLShareBtnCell”];第二步:QGLSh...
阅读全文
摘要:自定义导航控制器,重写下面的方法,创建一个返回箭头按钮 1 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated 2 3 { 4 5 if (self.viewContr...
阅读全文
摘要:我们写界面要考虑很多用户体验问题,键盘事件的响应就是比较麻烦的一种。我们需要监听键盘事件,考虑点击背景收起键盘、考虑键盘遮挡输入框问题等等,而且每个界面都要做这么一套。这个库帮我们解决了这个事情。这个库的下载地址:https://github.com/hackiftekhar/IQKeyboardM...
阅读全文