您的位置:首页 > 其它

0911 蓝懿记录

2015-09-12 16:50 10 查看
如果想要直接用路径图片

cell.imageView.image = [UIImage imageWithContentsOfFile: @“路径”];filePath];

tableview的CELL中添加右侧按钮 还有按钮颜色

tableview的左右键添加

注意viewWillAppear/viewDidappear/viewWilldisappear/viewDiddisappear

关于cell中按钮的设置操作

cell.textLabel.text = person.name;

cell.detailTextLabel.text = person.number;

//设置显示的效果

cell.textLabel.textColor = [UIColor redColor];

cell.textLabel.font = [UIFont systemFontOfSize:20];

//背景颜色

// cell.backgroundColor = [UIColor blueColor];

// 给cell添加右侧图标(起到指示作用并不是按钮)

// [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];

// 添加右侧按钮(是按钮 最后语句重要)

这是button第二种选择方式 之前都是设置位置 这个是从系统中选择合适的

UIButton *detailbutton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];

[detailbutton addTarget:self action:@selector(clicked) forControlEvents:UIControlEventTouchUpInside];

//*****重要 cell.accessoryView = detailbutton;

文件管理器(NSfilemanager) 输入全部文件名的语句 contensofdirectoryatpath;

添加图片的第二种语句 uiimage imagewithcontentsoffile;

tableview刷新语句 [self.tableview reloaddata];

scrollview中结束语句

1 告知真实尺寸scrollview1.contentsize=CGsizeMake(数字,数字);

2 可动 scrollview1.pagingEnabled=YES;

3 设置偏移点 scrollview1.contentoffset=CGPointMake(数字,数字);

蓝懿网站 http://www.lanyikeji.com/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: