护舒宝

 

2015年12月9日

简单自定义UIToolBar

摘要: let item1 = UIBarButtonItem(title: "分享", style: .Plain, target: self, action: nil) let item2 = UIBarButtonItem(barButtonSystemItem: .Pause, ta... 阅读全文

posted @ 2015-12-09 16:14 护舒宝 阅读(294) 评论(0) 推荐(0)

swift重写导航控制器类的 initialize 方法

摘要: //这个方法,是当这个类第一次被创建时调用,且只调用一次 override class func initialize() { let navBar = UINavigationBar.appearance() // 设置导航栏变得不透... 阅读全文

posted @ 2015-12-09 15:41 护舒宝 阅读(473) 评论(0) 推荐(0)

swift中的UITextField

摘要: let userTF = UITextField(frame: CGRectMake(0,120,300,40)) userTF.backgroundColor = UIColor.redColor() // 输入框样式 userTF.b... 阅读全文

posted @ 2015-12-09 15:13 护舒宝 阅读(287) 评论(0) 推荐(0)

swift中UIImageView的创建

摘要: let imageView = UIImageView() let imageView1 = UIImageView(frame: CGRectMake(0, 0, 20, 20)) // 创建出来的UIImageView的大小是图片的... 阅读全文

posted @ 2015-12-09 14:37 护舒宝 阅读(455) 评论(0) 推荐(0)

Swift的UILabel的一些属性

摘要: let label = UILabel(frame: CGRectMake(0,0,100,30)) label.backgroundColor = UIColor.redColor() label.text = "我... 阅读全文

posted @ 2015-12-09 14:08 护舒宝 阅读(602) 评论(0) 推荐(0)

swift视图的添加及层次变动和基本动画

摘要: // 一般的我们添加一个视图到父视图都是通过 /* let v1 = UIView(frame:CGRectMake(100,200,30,50)) self.view.addSubview(v1) // self... 阅读全文

posted @ 2015-12-09 11:49 护舒宝 阅读(419) 评论(0) 推荐(0)

swift和OC中frame的小差异

摘要: //1.0 OC中 CGRect 、CGPoint、CGSize 的结构如下: struct CGRect { CGPoint origin; CGSize size; }; struct CGPoint { ... 阅读全文

posted @ 2015-12-09 10:11 护舒宝 阅读(817) 评论(0) 推荐(0)

导航