
ios
灿烂i
这个作者很懒,什么都没留下…
展开
-
ios基本控件操作
随手记一下,省得以后老需要百度,想到哪里记到哪里吧. UIButton //设置按钮圆角 self.but.layer.cornerRadius = 15; //设置边框 [self.but.layer setBorderWidth:1.0]; self.but.layer.borderColor=[UIColor blackColor].CGColor; //点击事件 [self.but addTarget:self action:@selector(login) forControlEvents:UIC原创 2021-12-26 23:54:32 · 1265 阅读 · 0 评论 -
ios delegate传值
楔子 iOS里不同View之间传值有多种方式,常用的一种是delegate。具体如下: 概述 delegate典型应用场景如下:由OneView进入TwoView,在TwoView里输入值后,传回到OneView中。工程文件结构如下 步骤 1.定义delegate Xcode-File-New-File选择Objective-c File,点击next,在File Type:中选择Protocol,next后即可创建一个delegate。 #import <Foundation/Foundation原创 2021-12-26 00:02:34 · 1504 阅读 · 0 评论 -
ios 购物车加减号功能实现
这段时间又给忘记已久的ios重新捡起来了,随手记下这个功能,免得以后忘记 //加 -(void)plusgo:(UIButton *) button{ //遍历整个tableview中可见的cell for (ChecklistTableViewCell *cell1 in [self.tableView visibleCells]) { if (cell1.pronum.tag == button.tag) {原创 2021-11-03 00:05:16 · 359 阅读 · 0 评论