请问一下笔记本显示屏里的led背光显示屏电压是多少v的?

iOS疯狂详解之UITableView的全选和多选功能
多选做法如下:
- (void)tableView:(UITableView *)tableViewdidSelectRowAtIndexPath:(NSIndexPath *)indexPath
[tableViewdeselectRowAtIndexPath:indexPath animated:YES];
Custom *cell= (Custom*)[tableView cellForRowAtIndexPath:indexPath];
NSUIntegerrow = [indexPath row];
NSMutableDictionary *dic = [contacts objectAtIndex:row];
if ([[dicobjectForKey:@"checked"] isEqualToString:@"NO"]) {
[dic setObject:@"YES" forKey:@"checked"];
[cell setChecked:YES];
[dic setObject:@"NO" forKey:@"checked"];
[cell setChecked:NO];
在cell类中添加BOOL属性checked和设置方法setChecked...
全选做法如下:
NSArray *anArrayOfIndexPath = [NSArray arrayWithArray:[contactListindexPathsForVisibleRows]];
for (int i =0; i < [contacts count]; i&#43;&#43;) {
NSIndexPath *indexPath= [anArrayOfIndexPath objectAtIndex:i];
Custom *cell = (Custom*)[contactListcellForRowAtIndexPath:indexPath];
NSUInteger row = [indexPath row];
NSMutableDictionary *dic = [contacts objectAtIndex:row];
if ([[[(UIButton*)sender titleLabel] text] isEqualToString:@"全选"]){
[dic setObject:@"YES" forKey:@"checked"];
[cell setChecked:YES];
[dic setObject:@"NO" forKey:@"checked"];
[cell setChecked:NO];rainbird2 的BLOG
用户名:rainbird2
文章数:285
评论数:1151
访问量:2212074
注册日期:
阅读量:5863
阅读量:12276
阅读量:398896
阅读量:1089128
51CTO推荐博文
前面有说过&&&&,效果还算酷,其实笔者一直看着iphone里自带的mail程序的多选删除功能心里痒痒,只是一直没时间研究是怎么实现的.这不花了半天功夫有时间搞定了,特记录一下.
不会搞的时候,觉得很难,等研究明白了觉得原来是这么回事儿.
第一步,实现-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
-&(UITableViewCellEditingStyle)tableView:(UITableView&*)tableView&editingStyleForRowAtIndexPath:(NSIndexPath&*)indexPath&{&&&&&return&UITableViewCellEditingStyleDelete&|&UITableViewCellEditingStyleI&}&
UITableViewCellEditingStyleDelete是出现红的减号,再点一下就出来划动时出现的删除钮;UITableViewCellEditingStyleInsert是出现红的加号应该是插入数据的时候用的吧,没细研究,最神奇的是两个同时出现就出现了前面带圈的多选项.
第二步,调出前面带圈的多选项.其实就是调用[self.tableview setEditing:YES animated:YES]啦,隐藏的话就setEditing:NO
第三步,实现记录选择或者取消的项.笔者竟然没有找到实现这个功能的专门的方法,没办法了,自己折中实现一下喽.
-&(void)tableView:(UITableView&*)tableView&didSelectRowAtIndexPath:(NSIndexPath&*)indexPath&{&&&&&if&(rightButton.title==&@&确定&)&{&&&&&&&&&[deleteDic&setObject:indexPath&forKey:[dataArray&objectAtIndex:indexPath.row]];&&&&&&&&&&&&&&}&&&&&else&{&&&&&&&&&&&&&&}&}&&-&(void)tableView:(UITableView&*)tableView&didDeselectRowAtIndexPath:(NSIndexPath&*)indexPath{&&&&&if&(rightButton.title&==&@&确定&)&{&&&&&&&&&[deleteDic&removeObjectForKey:[dataArray&objectAtIndex:indexPath.row]];&&&&&}&&&&&&}&
一个是多选状态下添加刚选择的项,一下移除刚取消的项.哎,真复杂.
第四步,得到想删除的项了,处理一下呗
[dataArray&removeObjectsInArray:[deleteDic&allKeys]];&[self.tableview&deleteRowsAtIndexPaths:[NSArray&arrayWithArray:[deleteDic&allValues]]&withRowAnimation:UITableViewRowAnimationFade];&[deleteDic&removeAllObjects];&
好啦,搞定,看一下效果图.
首先得到一个列表.
点击编辑,出现选择框.
选择想要删除的项.
删除以后的效果.
具体代码见附件.
&相关文章:
&&&&本文出自 “” 博客,请务必保留此出处
了这篇文章
附件下载:  
类别:┆阅读(0)┆评论(0)
10:48:43 13:16:06 16:12:04 10:57:19 11:06:06 19:16:04 16:23:02 19:48:49 14:33:02 20:33:44 12:43:39 13:45:12 14:57:57
请输入验证码:3243人阅读
TableView如何实现单选或者多选呢?
我们的直接思路是修改某一个Cell的样式即可,
那么修改样式需要通过修改对应的数据,
从这里可以推断我们需要给Cell对应的数据设置一个标志位,
当选中的时候来修改该标志位刷新那一行即可
如果是单选实现稍微复杂一些:
单选需要设置一个属性来保存上一次选中的行,
待选中新的行之后需要修改该行,不断维护
我的实现如下:
(1)创建一个TableViewController,
为了简单使用系统的Cell样式
设置重用标识符为 ACELL
cell对应的Model类为Person,
Person是Cell上对应的数据还包括是否选中的标志位
(2)导航栏的左边按钮用来提交单选的结果,右边按钮用来跳转到复选的界面
(3)关键代码
Person数据类,为cell提供数据
ifSelected属性的YES 或者 NO关乎是否该行cell被标记
app39-表视图8-单选复选
Created by MRBean on 15/7/24.
Copyright (c) 2015年 yangbin. All rights reserved.
#import &Foundation/Foundation.h&
@interface Person : NSObject
@property(copy,nonatomic)NSString *//cell上的textLabel数据
@property(copy,nonatomic)NSString *//cell上的detailLabel数据
@property(assign,nonatomic)BOOL ifS//是否选中
TableViewController
TableViewController.m
app39-表视图8-单选复选
Created by MRBean on 15/7/24.
Copyright (c) 2015年 yangbin. All rights reserved.
#import &TableViewController.h&
#import &Person.h&
@interface TableViewController ()
@property(strong,nonatomic)NSMutableArray *//数据来源
@property(strong,nonatomic)NSIndexPath *lastS//上一次选中的额索引
@implementation TableViewController
//初始时产生假数据
- (void)viewDidLoad {
[super viewDidLoad];
_marr = [[NSMutableArray alloc]init];
for (int i=0; i&20; i++)//产生大量假数据,使用系统的Cell
Person *p = [[Person alloc]init];
p.title = [NSString stringWithFormat:@&%iTitle&,i];
p.detail = [NSString stringWithFormat:@&%iDetail&,i];
p.ifSelected = NO;//是否被选中,默认都是NO
[_marr addObject:p];
#pragma mark - 数据源
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _marr.
//配置每一个cell的显示
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@&ACELL& forIndexPath:indexPath];
Person *p = _marr[indexPath.row];
cell.textLabel.text = p.//cell上的title显示
cell.detailTextLabel.text = p.
//以下为关键代码1
if(p.ifSelected)//是否选中,如果为YES则标记
cell.accessoryType = UITableViewCellAccessoryC//勾标记
else cell.accessoryType = UITableViewCellAccessoryN//不标记
//选中一行cell后改变数据
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
NSIndexPath *temp = self.lastS//暂存上一次选中的行
if(temp && temp!=indexPath)//如果上一次的选中的行存在,并且不是当前选中的这一样,则让上一行不选中
Person *tp = _marr[temp.row];
tp.ifSelected = NO;//修改之前选中的cell的数据为不选中
[tableView reloadRowsAtIndexPaths:@[temp] withRowAnimation:UITableViewRowAnimationAutomatic];//刷新该行
self.lastSelected = indexP//选中的修改为当前行
Person *p = _marr[indexPath.row];
p.ifSelected = YES;//修改这个被选中的一行choon
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];//重新刷新这一行
//点击提交,打印选中的结果
- (IBAction)tapSubmit:(UIBarButtonItem *)sender
Person *select = _marr[_lastSelected.row];
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@&你选择的是:& message:select.title delegate:nil cancelButtonTitle:@&我知道了& otherButtonTitles:nil, nil];
[alert show];
//收到内存警告
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
下一篇:TableView复选的实现
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:223840次
积分:2499
积分:2499
排名:第12464名
原创:91篇
评论:14条
阅读:3451
(8)(2)(2)(1)(2)(1)(2)(9)(4)(5)(5)(12)(25)(8)(3)(5)(1)(1)2015年4月 移动开发大版内专家分月排行榜第二
2015年5月 移动开发大版内专家分月排行榜第三2015年3月 移动开发大版内专家分月排行榜第三2014年10月 移动开发大版内专家分月排行榜第三
2015年5月 移动开发大版内专家分月排行榜第一2015年4月 移动开发大版内专家分月排行榜第一2014年9月 移动开发大版内专家分月排行榜第一
2015年3月 移动开发大版内专家分月排行榜第二2014年8月 移动开发大版内专家分月排行榜第二
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。iOS开发UI篇—在UItableview中实现加载更多功能 - 文顶顶 - 博客园
最怕你一生碌碌无为 还安慰自己平凡可贵
一、实现效果
点击加载更多按钮,出现一个加载图示,三秒钟后添加两条新的数据。
& & & & & & & & & &&
二、实现代码和说明
当在页面(视图部分)点击加载更多按钮的时候,主页面(主控制器)会加载两条数据进来。
视图部分的按钮被点击的时候,要让主控制器加载数据,刷新表格,2B青年会在视图中增加一个主控制器的属性,通过这个属性去调用进行加载,但在开发中通常通过代理模式来完成这个操作。
下面分别是两种实现的代码。
1、项目结构和说明
说明:加载更多永远都放在这个tableview的最下端,因此这里设置成了这个tableview的tableFooterView。
&self.tableview.tableFooterView=
在实现上通过xib来进行处理,考虑到左右的留白,以及点击后的要切换到加载按钮和文字,要同时控制图标和文字,因此把加载图标和文字提示放在了一个view中以便控制,这个xib已经和YYfooterview.xib进行了关联,通过这个类来控制xib。
2、实现代码
(1).垃圾代码
数据模型部分
YYtg.h文件
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &Foundation/Foundation.h&
10 #import "Global.h"
12 @interface YYtgModel : NSObject
13 @property(nonatomic,copy)NSString *
14 @property(nonatomic,copy)NSString *buyC
15 @property(nonatomic,copy)NSString *
16 @property(nonatomic,copy)NSString *
18 //对外接口
19 YYinitH(tg)
YYtg.m文件
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYtgModel.h"
11 @implementation YYtgModel
12 YYinitM(tg)
注意:对于数据转模型部分的构造方法接口和实现代码已经通过自定义带参数的宏来进行了封装。
封装代码如下:
1 #ifndef _0____________Global_h
2 #define _0____________Global_h
自定义带参数的宏
YYinitH(name)
-(instancetype)initWithDict:(NSDictionary *)\
8 +(instancetype)name##WithDict:(NSDictionary *)
11 #define
YYinitM(name)
-(instancetype)initWithDict:(NSDictionary *)dict\
if (self=[super init]) {\
[self setValuesForKeysWithDictionary:dict];\
19 +(instancetype)name##WithDict:(NSDictionary *)dict\
return [[self alloc]initWithDict:dict];\
YYtgcell.h文件
YYtgcell.h
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &UIKit/UIKit.h&
10 #import "YYtgModel.h"
12 @interface YYtgcell : UITableViewCell
13 @property(nonatomic,strong)YYtgModel *
15 //把加载数据(使用xib创建cell的内部细节进行封装)
16 +(instancetype)tgcellWithTableView:(UITableView *)tableV
YYtgcell.m文件
YYtgcell.m
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYtgcell.h"
10 //私有扩展
11 @interface YYtgcell()
12 @property (strong, nonatomic) IBOutlet UIImageView *
13 @property (strong, nonatomic) IBOutlet UILabel *
14 @property (strong, nonatomic) IBOutlet UILabel *
15 @property (strong, nonatomic) IBOutlet UILabel *
17 @implementation YYtgcell
19 #pragma mark 重写set方法,完成数据的赋值操作
20 -(void)setYytg:(YYtgModel *)yytg
self.img.image=[UIImage imageNamed:yytg.icon];
self.titlelab.text=yytg.
self.pricelab.text=[NSString stringWithFormat:@"$%@",yytg.price];
self.buycountlab.text=[NSString stringWithFormat:@"已有%@人购买",yytg.buyCount];
29 +(instancetype)tgcellWithTableView:(UITableView *)tableView
static NSString *identifier= @"tg";
YYtgcell *cell=[tableView dequeueReusableCellWithIdentifier:identifier];
if (cell==nil) {
//如何让创建的cell加个戳
//对于加载的xib文件,可以到xib视图的属性选择器中进行设置
cell=[[[NSBundle mainBundle]loadNibNamed:@"tgcell" owner:nil options:nil]firstObject];
NSLog(@"创建了一个cell");
YYfooterview.h文件
YYfooterview.h
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &UIKit/UIKit.h&
10 @class YYViewC
11 @interface YYfooterview : UIView
12 @property(nonatomic,strong) YYViewController *
YYfooterview.m文件
YYfooterview.m
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYfooterview.h"
10 #import "YYViewController.h"
12 @interface YYfooterview ()
13 @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *
14 @property (strong, nonatomic) IBOutlet UIButton *
17 @implementation YYfooterview
18 - (IBAction)loadbtclick {
NSLog(@"按钮被点击了");
//隐藏按钮
self.loadbtn.hidden=YES;
//显示菊花
self.loadingview.hidden=NO;
25 #warning 模拟发送网络请求, 3秒之后隐藏菊花
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// 3.调用控制的加载数据方法
[self.controller LoadMore];
// 4.隐藏菊花视图
self.loadingview.hidden = YES;
// 5.显示按钮
self.loadbtn.hidden = NO;
YYViewController.h文件
YYViewController.h
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &UIKit/UIKit.h&
11 @interface YYViewController : UIViewController
12 //公开接口
13 //- (void)LoadM
YYViewController.m文件
YYViewController.m
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYViewController.h"
10 #import "YYtgModel.h"
11 #import "YYtgcell.h"
12 #import "YYfooterview.h"
14 @interface YYViewController ()&UITableViewDataSource,UITableViewDelegate&
15 @property (strong, nonatomic) IBOutlet UITableView *
17 @property(strong,nonatomic)NSMutableArray *
20 @implementation YYViewController
22 #pragma mark-加载数据方法
23 -(void)LoadMore
//创建模型
YYtgModel *tgmodel=[[YYtgModel alloc]init];
tgmodel.title=@"菜好上桌";
tgmodel.icon=@"5ee372ffaf";
tgmodel.buyCount=@"20";
tgmodel.price=@"10000";
//将模型添加到数组中
[self.tg addObject:tgmodel];
YYtgModel *tgmodelq=[[YYtgModel alloc]init];
tgmodelq.title=@"菜好上桌1";
tgmodelq.icon=@"5ee372ffaf";
tgmodelq.buyCount=@"20";
tgmodelq.price=@"10000";
[self.tg addObject:tgmodelq];
//刷新表格
[self.tableview reloadData];
45 - (void)viewDidLoad
[super viewDidLoad];
self.tableview.rowHeight=80.f;
//加载底部视图
//从xib中获取数据
UINib *nib=[UINib nibWithNibName:@"YYfooterview" bundle:nil];
YYfooterview *footerview=[[nib instantiateWithOwner:nil options:nil] firstObject];
self.tableview.tableFooterView=
//设置控制
footerview.controller=
58 #pragma mark-
59 -(NSArray *)tg
if (_tg==nil) {
NSString *fullpath=[[NSBundle mainBundle]pathForResource:@"tgs.plist" ofType:nil];
NSArray *temparray=[NSArray arrayWithContentsOfFile:fullpath];
NSMutableArray *arrayM=[NSMutableArray arrayWithCapacity:temparray.count];
for (NSDictionary *dict in temparray) {
YYtgModel *tg=[YYtgModel tgWithDict:dict];
[arrayM addObject:tg];
_tg=arrayM;
75 #pragma mark- xib创建cell数据处理
77 #pragma mark 多少组
78 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
83 #pragma mark多少行
84 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
return self.tg.
89 #pragma mark设置每组每行
90 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
//1.创建cell
YYtgcell *cell=[YYtgcell tgcellWithTableView:tableView];
//2.获取当前行的模型,设置cell的数据
YYtgModel *tg=self.tg[indexPath.row];
cell.yytg=
//3.返回cell
103 #pragma mark- 隐藏状态栏
104 -(BOOL)prefersStatusBarHidden
return YES;
2.通过代理完成
当按钮被点击的时候,视图部分本身不干活,而是通知它的代理(控制器)完成接下来的操作。
该部分代码在1的基础上对下面几个文件进行了修改:
视图部分:
YYfooterview.h文件
YYfooterview.h
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &UIKit/UIKit.h&
10 @class YYViewController ,YY
11 //约定协议
12 @protocol YYfooterviewDelegate &NSObject&
13 -(void)footerviewLoadM
16 @interface YYfooterview : UIView
18 //声明一个id类型属性,遵守了协议的&人&即可成为它的代理
19 @property(nonatomic,strong)id&YYfooterviewDelegate& delegate;
20 //@property(nonatomic,strong) YYViewController *
YYfooterview.m文件
YYfooterview.m
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYfooterview.h"
10 #import "YYViewController.h"
12 @interface YYfooterview ()
13 @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *
14 @property (strong, nonatomic) IBOutlet UIButton *
17 @implementation YYfooterview
18 - (IBAction)loadbtclick {
NSLog(@"按钮被点击了");
//隐藏按钮
self.loadbtn.hidden=YES;
//显示菊花
self.loadingview.hidden=NO;
25 #warning 模拟发送网络请求, 3秒之后隐藏菊花
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// 3.调用控制的加载数据方法
[self.controller LoadMore];
//通知代理
[self.delegate footerviewLoadMore];
// 4.隐藏菊花视图
self.loadingview.hidden = YES;
// 5.显示按钮
self.loadbtn.hidden = NO;
主控制器部分
YYViewController.h文件
YYViewController.h
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import &UIKit/UIKit.h&
11 @interface YYViewController : UIViewController
12 //公开接口
13 //- (void)LoadM
YYViewController.m文件
YYViewController.m
02-团购(使用xib和类完成数据展示)
Created by apple on 14-5-29.
Copyright (c) 2014年 itcase. All rights reserved.
9 #import "YYViewController.h"
10 #import "YYtgModel.h"
11 #import "YYtgcell.h"
12 #import "YYfooterview.h"
14 @interface YYViewController ()&UITableViewDataSource,UITableViewDelegate,YYfooterviewDelegate&
15 @property (strong, nonatomic) IBOutlet UITableView *
17 @property(strong,nonatomic)NSMutableArray *
20 @implementation YYViewController
22 #pragma mark-加载数据方法
23 -(void)footerviewLoadMore
//创建模型
YYtgModel *tgmodel=[[YYtgModel alloc]init];
tgmodel.title=@"菜好上桌";
tgmodel.icon=@"5ee372ffaf";
tgmodel.buyCount=@"20";
tgmodel.price=@"10000";
//将模型添加到数组中
[self.tg addObject:tgmodel];
YYtgModel *tgmodelq=[[YYtgModel alloc]init];
tgmodelq.title=@"菜好上桌1";
tgmodelq.icon=@"5ee372ffaf";
tgmodelq.buyCount=@"20";
tgmodelq.price=@"10000";
[self.tg addObject:tgmodelq];
//刷新表格
[self.tableview reloadData];
44 //-(void)LoadMore
//创建模型
YYtgModel *tgmodel=[[YYtgModel alloc]init];
tgmodel.title=@"菜好上桌";
tgmodel.icon=@"5ee372ffaf";
tgmodel.buyCount=@"20";
tgmodel.price=@"10000";
//将模型添加到数组中
[self.tg addObject:tgmodel];
YYtgModel *tgmodelq=[[YYtgModel alloc]init];
tgmodelq.title=@"菜好上桌1";
tgmodelq.icon=@"5ee372ffaf";
tgmodelq.buyCount=@"20";
tgmodelq.price=@"10000";
[self.tg addObject:tgmodelq];
//刷新表格
[self.tableview reloadData];
66 - (void)viewDidLoad
[super viewDidLoad];
self.tableview.rowHeight=80.f;
//加载底部视图
//从xib中获取数据
UINib *nib=[UINib nibWithNibName:@"YYfooterview" bundle:nil];
YYfooterview *footerview=[[nib instantiateWithOwner:nil options:nil] firstObject];
self.tableview.tableFooterView=
//设置控制
footerview.controller=
//设置代理
footerview.delegate=
81 #pragma mark-
82 -(NSArray *)tg
if (_tg==nil) {
NSString *fullpath=[[NSBundle mainBundle]pathForResource:@"tgs.plist" ofType:nil];
NSArray *temparray=[NSArray arrayWithContentsOfFile:fullpath];
NSMutableArray *arrayM=[NSMutableArray arrayWithCapacity:temparray.count];
for (NSDictionary *dict in temparray) {
YYtgModel *tg=[YYtgModel tgWithDict:dict];
[arrayM addObject:tg];
_tg=arrayM;
98 #pragma mark- xib创建cell数据处理
100 #pragma mark 多少组
101 -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
106 #pragma mark多少行
107 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
return self.tg.
112 #pragma mark设置每组每行
113 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
//1.创建cell
YYtgcell *cell=[YYtgcell tgcellWithTableView:tableView];
//2.获取当前行的模型,设置cell的数据
YYtgModel *tg=self.tg[indexPath.row];
cell.yytg=
//3.返回cell
126 #pragma mark- 隐藏状态栏
127 -(BOOL)prefersStatusBarHidden
return YES;
随笔 - 179
评论 - 1451

我要回帖

更多关于 笔记本显示屏背光不亮 的文章

 

随机推荐