ios8 如果UITableView只设置viewForHeaderInSection,则可能section不能显示,iOS7及以下版本显示正常。解决方案:设置heightForHeaderInSection。- (CGFloat)tableView:(UITableView *)tableView...
分类:
移动开发 时间:
2014-10-20 21:02:08
阅读次数:
163
难度在于字典转模型的地方,因为模型有2层级。
增加了一个知识点,即显示组索引。用sectionIndexTitlesForTableView方法,返回值是一个数组,所以我们这里也用到了valueForKeyPath这个方法取得一个字符串组。...
分类:
移动开发 时间:
2014-10-20 15:10:49
阅读次数:
228
监听是否点击的时“确定”按钮,如果是,则先获取文本框文字,然后利用alert.tag找到对应的数据模型,用这个获得的文字替换原来的模型数据,最后刷新一下tableView,只有修改数据模型,才能彻底改变tableView的显示结果,否则只修改tableView,等重新加载的时候还是会显示原来的数据,因为数据模型没有修改。...
分类:
移动开发 时间:
2014-10-20 13:32:31
阅读次数:
189
plain有头部悬停效果,类似于QQ分组好友的那个组名称在最顶部悬停,直到被下一组顶替。...
分类:
移动开发 时间:
2014-10-20 11:43:55
阅读次数:
201
最终效果图:
分MVC三层设计;自定义的Cell有两种;一种是MainCell,由ModelArr提供数据源;另一种是插入的cell,由代码创建,并且由另外一个数组供状态数据
数据源部分:
//
// MyProjectCellModel.h
// 动态插入删除行
//
// Created by beyond on 14-10-18....
分类:
移动开发 时间:
2014-10-18 15:36:26
阅读次数:
267
[cell.followBtn addTarget:self action:@selector(onFollowButtonsClickEvent:) forControlEvents:UIControlEventTouchUpInside]; [cell.followBtn setTag:ind....
分类:
其他好文 时间:
2014-10-18 15:28:00
阅读次数:
182
#Cell _followBtn = [[UIButton alloc]initWithFrame:CGRectMake(kMainApplicationWidth-79.0f, 20.0f, 67.0, 30.0f)]; _followBtn.titleLabel.font = [UIFont s...
分类:
其他好文 时间:
2014-10-18 15:16:29
阅读次数:
213
解决办法在 生命周期函数viewDidAppear中设置即可1 - (void)viewDidAppear:(BOOL)animated2 3 {4 5 self.tableView.frame = CGRectMake(0, 20, 320, 480);6 7 }
分类:
移动开发 时间:
2014-10-17 15:28:19
阅读次数:
143
效果图:.h#import @interface RootViewController : UIViewController{ UITableView *mTableView;}@end.m- (void)viewDidLoad{ [super viewDidLoad]; // D...
分类:
其他好文 时间:
2014-10-17 13:39:00
阅读次数:
166
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
...
分类:
其他好文 时间:
2014-10-17 11:55:33
阅读次数:
136