工作中的问题tips
u011011294
这个作者很懒,什么都没留下…
展开
-
iOS 开发,UITableViewController中手势关闭cell中的键盘。且不影响tableView中的 didSelectRowAtIndexPath 方法。
定义手势,实现协议。 UITapGestureRecognizer * gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:)]; gesture.delegate = self; [self.view addGestureRecognizer:gestu原创 2015-11-04 11:14:46 · 493 阅读 · 0 评论 -
No index path for table cell being reused 这个问题
问题原因是:我用nib自定义了一个cell。作为我的tableFootView.当然在我执行下面的这段代码的时候,tableFootView 的显示没有任何问题。委托也能正常执行。 footCell = [[NSBundle mainBundle] loadNibNamed:@"RRTableFootBtnCell" owner:self options:nil][0]; self.tab原创 2015-11-04 16:24:26 · 2450 阅读 · 2 评论 -
iOS工作中的问题-----navigationBar透明方法、遮挡UIViewController、UITableViewController 视图解决方法
导航栏透明方法: UIImage *image = [UIImage imageNamed:@"clear"]; [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault]; [self.navigationController.nav原创 2015-10-20 13:59:17 · 3511 阅读 · 0 评论 -
iOS tableView section 和cell 一同滚动的方法
1、在ViewDidLoad中添加: self.edgesForExtendedLayout = UIRectEdgeNone;目的是为了来回滚动的时候,不让tableView 顶端在navigationController中。 2、实现scrollView的一个委托:-(void)scrollViewDidScroll:(UIScrollView *)scrollView{ if (s原创 2015-11-13 13:48:29 · 427 阅读 · 0 评论 -
实现iOS7以前的TableViewGroupStyle的方法。
iOS7以前的TableViewGroupStyle 是每个section 都是圆角的形式展现的。以后的版本实现这个样式。代码来源:stackoverflow OC代码:- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *原创 2015-11-18 14:52:03 · 356 阅读 · 0 评论