摘要: 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 朝阳向日葵 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 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 朝阳向日葵 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 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 朝阳向日葵 阅读(456) 评论(0) 推荐(0) 编辑
摘要: 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 朝阳向日葵 阅读(2764) 评论(0) 推荐(0) 编辑
摘要: 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 朝阳向日葵 阅读(2280) 评论(0) 推荐(0) 编辑