会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
向日葵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
2020年4月17日
iOS开发之category(类别)
摘要: 首先,category 可以在不获悉,不改变原来代码的情况下往里面添加新的方法,只能添加,不能删除修改,并且如果类别和原来类中的方法产生名称冲突,则类别将覆盖原来的方法,因为类别具有更高的优先级。 类别主要有3个作用: 1).将类的实现分散到多个不同文件或多个不同框架中。 2).创建对私有方法的前向
阅读全文
posted @ 2020-04-17 22:50 朝阳向日葵
阅读(796)
评论(0)
推荐(0)
2018年5月17日
iOS开发传值方式
摘要: 一、属性传值(正向传值) //实例化一个新的控制器ViewControllerB ViewControllerB *ctl = [ViewControllerB new]; //正向传值,通过成员变量 ctl.receiveStr = sender.titleLabel.text; //切换 /*
阅读全文
posted @ 2018-05-17 15:21 朝阳向日葵
阅读(160)
评论(0)
推荐(0)
2017年10月20日
Swift UINavigationController
摘要: import UIKitimport CoreData@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ applicat
阅读全文
posted @ 2017-10-20 08:03 朝阳向日葵
阅读(1412)
评论(0)
推荐(0)
2017年10月19日
Swift UIImageView常用方法
摘要: import UIKitclass ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let image = UIImage.init(named: "111.png"); let
阅读全文
posted @ 2017-10-19 11:16 朝阳向日葵
阅读(3086)
评论(0)
推荐(0)
Swift UIView常用方法
摘要: import UIKitclass ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let button = UIButton(type:.system); button.fra
阅读全文
posted @ 2017-10-19 10:33 朝阳向日葵
阅读(1041)
评论(0)
推荐(0)
2017年10月17日
Swift UITextField常用方法
摘要: let textfiled = UITextField(); textfiled.frame = CGRect.init(x:100,y:250,width:160,height:30); textfiled.borderStyle = UITextBorderStyle.roundedRect;
阅读全文
posted @ 2017-10-17 14:52 朝阳向日葵
阅读(412)
评论(0)
推荐(0)
Swift UIButton
摘要: let button = UIButton(type:.system); button.frame = CGRect.init(x:100,y:150,width:160,height:30); button.setTitle("SwiftBtton", for: .normal); button.
阅读全文
posted @ 2017-10-17 12:05 朝阳向日葵
阅读(226)
评论(0)
推荐(0)
Swift UILabel方法总结
摘要: let label = UILabel(); label.frame = CGRect(x:100,y:100,width:160,height:30); label.text = "我是SwiftLabel"; label.backgroundColor = UIColor.orange; lab
阅读全文
posted @ 2017-10-17 11:43 朝阳向日葵
阅读(461)
评论(0)
推荐(0)
Swift 字典的常用方法
摘要: var dict1 = [1:"A",2:"B",3:"C",4:"D",5:"E"]; var test1 = ["key1":"你好","key2":"Swift","key3":"正在学习","key4":"字典","key5":"取值"] //根据键去取值 print(test1["
阅读全文
posted @ 2017-10-17 10:30 朝阳向日葵
阅读(2772)
评论(0)
推荐(0)
Swift 数组的常用方法
摘要: var numbers = [0,1,2,3,4,5]; var vowels = ["A","E","I","O","U"]; var emptyArr = [Int](); //数组元素的个数 print("数组的长度为:\(numbers.count),\(vowels.count),\(em
阅读全文
posted @ 2017-10-17 09:33 朝阳向日葵
阅读(2289)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
12
下一页
公告