首先可以先下载一个dome
https://github.com/joinxinxu/WPhoto
然后编辑你需要使用到的按钮
使用的全局变量哦!!!!!!!!!!!!!!!!!!
屏幕快照 2018-10-22 上午9.59.32.png
_shangchuan = [[UIButton alloc]init];
_shangchuan.frame = CGRectMake(0, self.view.fream.size.height - 50, 100, 100);
[_shangchuan setTitle:@"123" forState:UIControlStateNormal];
[_shangchuan addTarget:self action:@selector(shangchuanBtn) forControlEvents:UIControlEventTouchUpInside];
_shangchuan.backgroundColor = [UIColor redColor];
[self.view addSubview:_shangchuan];
_qingchu = [[UIButton alloc]init];
_qingchu.frame = CGRectMake(150, self.view.fream.size.height - 50, 100, 100);
[_qingchu setTitle:@"123" forState:UIControlStateNormal];
_qingchu.backgroundColor = [UIColor redColor];
[self.view addSubview:_qingchu];
_yizhang = [[UIButton alloc]init];
_yizhang.frame = CGRectMake(300, self.view.fream.size.height - 50, 100, 100);
[_yizhang setTitle:@"123" forState:UIControlStateNormal];
_yizhang.backgroundColor = [UIColor redColor];
[self.view addSubview:_yizhang];
然后根据dome继续完善工程
别忘了访问相册权限哦
Privacy - Photo Library Usage Description
网友评论