xcode编译提示问题:Existing instance variable '_delegate' for property 'delegate' with  assign attribute must be __unsafe_unretained 改动为: __unsafe_unretained id<QuadCurveMenuDelegate> _delegate; 这样就能够编译通过了.…
原来非ARC代码是 @interface MHWebImageDownloader : NSObject { id<MHWebImageDownloaderDelegate> delegate; } . . . @property (nonatomic, weak) id<MHWebImageDownloaderDelegate> delegate; 变为 ARC 该代码报错,Existing instance variable 'delegate' for property wi…
使用storyboard结合代码来做确实能够给开发带来非常多的便利. 在实践的过程中,我们常常会遇到界面的跳转问题. 通过控件和界面的建立的"连接"就能够了. 假设是navigationcontroller的跳转,则选择push的方式(否则xcode执行的时候会报错): 假设是Viewcontroller的跳转,则选择modal的方式. 假设你想通过代码来打开另外一个界面.则须要设置他们之间连接的segue.identifier,比方你设置为jumpid. 然后代码就能够这么写: se…
非常easy的一句代码 self.view.backgroundColor = UIColor.clearColor() 由此联想开来,非常多的控件想设置为背景透明都能够用UIColor.clearColor()…
第一步:在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO 第二步:在viewDidLoad中加一句 UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent; 这样就能够把默认的黑色改为白色.…
废话少说,直接上代码: var barsAnim = UIImageView(frame: self.view.frame); barsAnim.animationImages = NSArray() as [AnyObject]; barsAnim.animationImages?.append(UIImage(named: "wave_000")!); barsAnim.animationImages?.append(UIImage(named: "wave_001&qu…
打开xcode->preference->location->derived Data,进入文件夹下,删除里面所以后的文件夹就能够了.…
在做项目的时候,假设使用系统的UITabBarController的时候,底部的tab自己定义图片显示是蓝色和灰色的.这不是我们所想要的效果. 假设想显示自己定义的按下和弹起的图片效果.这个时候就须要对TabBarItem进行改动. 下面就是详细的演示样例: var itemNameArray:[String] = ["down_32","add_32","plane_32","circle_32"] var itemName…
self.tableView.backgroundView? .backgroundColor = UIColor.clearColor(); self.tableView.backgroundColor = UIColor.clearColor();…
本系列目录 使用Data Binding(一)介绍 使用Data Binding(二)集成与配置 使用Data Binding(三)在Activity中的使用 使用Data Binding(四)在Fragment中的使用 使用Data Binding(五)数据绑定 使用Data Binding(六)RecyclerView Adapter中的使用 使用Data Binding(七)使用BindingAdapter简化图片加载 使用Data Binding(八)使用自定义Interface 使用D…