03 2015 档案

摘要:colorWithPatternImage 非常占用内存,而且在swift中去掉了这个方法。sizeView.layer.contents = UIImage(named:"slect_bg")!.CGImage 阅读全文
posted @ 2015-03-10 15:53 ericjuns 阅读(1065) 评论(0) 推荐(0)
摘要:在func scrollViewWillBeginDecelerating(scrollView: UIScrollView) {sizeView.setContentOffset(CGPointMake(CGFloat(self.sizeX), 0), animated: true)} 这个函数中... 阅读全文
posted @ 2015-03-10 09:51 ericjuns 阅读(2401) 评论(0) 推荐(0)
摘要:首先: 设置使用UIScrollViewDelegate代理协议其次需要初始化全局变量:var picArray = [String]() //图片数量 let scrollview = UIScrollView() let pageControl = UIPageControl()... 阅读全文
posted @ 2015-03-08 18:50 ericjuns 阅读(1395) 评论(1) 推荐(0)
摘要:1\ 文字自动换行:label.numberOfLines = 0 阅读全文
posted @ 2015-03-01 17:15 ericjuns 阅读(296) 评论(0) 推荐(0)
摘要:swift 无法像js那样直接传入参数. 需要借助tag传参:ListBtn.addTarget(self, action: "Detail:", forControlEvents: .TouchUpInside)函数名中增加 ":" 字符咱函数中通过传入这个元素来实现传值:func Detail(... 阅读全文
posted @ 2015-03-01 14:40 ericjuns 阅读(4665) 评论(0) 推荐(0)