码迷,mamicode.com
首页 >  
搜索关键字:swift开发教程    ( 26个结果
Swift开发教程--设置UIViewController的背景透明
非常easy的一句代码 self.view.backgroundColor = UIColor.clearColor() 由此联想开来,非常多的控件想设置为背景透明都能够用UIColor.clearColor() 非常easy的一句代码 self.view.backgroundColor = UIC ...
分类:编程语言   时间:2017-08-12 10:19:05    阅读次数:180
Swift开发教程--怎样设置状态栏的文字颜色
第一步:在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO 第二步:在viewDidLoad中加一句 UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyl ...
分类:编程语言   时间:2017-07-30 12:50:29    阅读次数:129
Swift开发教程--怎样清除模拟器的数据
打开xcode->preference->location->derived Data,进入文件夹下,删除里面所以后的文件夹就能够了。 打开xcode->preference->location->derived Data,进入文件夹下,删除里面所以后的文件夹就能够了。 ...
分类:编程语言   时间:2017-07-02 13:08:24    阅读次数:193
Swift开发教程--怎样自己定义TabBarItem的图片显示
在做项目的时候,假设使用系统的UITabBarController的时候,底部的tab自己定义图片显示是蓝色和灰色的。这不是我们所想要的效果。 假设想显示自己定义的按下和弹起的图片效果。这个时候就须要对TabBarItem进行改动。 下面就是详细的演示样例: var itemNameArray:[S ...
分类:编程语言   时间:2017-05-30 17:58:40    阅读次数:168
Swift开发教程--设置圆角Button和圆角边框TextView
设置圆角Button button.layer.borderColor = UIColor.whiteColor().CGColor; button.layer.borderWidth = 2; button.layer.cornerRadius = 16; 设置圆角边框TextView inputTextView.layer.borderColor =...
分类:编程语言   时间:2015-08-27 13:30:03    阅读次数:391
Swift开发教程--如何在别的类中调用AppDelegate中的方法
((UIApplication.sharedApplication().delegate) as! AppDelegate).xxxmethod();...
分类:移动开发   时间:2015-08-25 14:15:56    阅读次数:121
Swift开发教程--如何计算字符串的宽度和高度
直接上代码,如下: /**     *  获取字符串的宽度和高度     *     *  @param text:NSString     *  @param font:UIFont     *     *  @return CGRect     */     class func getTextRectSize(text:NSString,font:UIFont,siz...
分类:编程语言   时间:2015-08-19 20:33:41    阅读次数:300
Swift开发教程--如何给UITextView添加圆角边框
直接上代码: self.textView.layer.borderColor = UIColor(red: 60/255, green: 40/255, blue: 129/255, alpha: 1).CGColor; self.textView.layer.borderWidth = 2; self.textView.layer.cornerRadius = 16;...
分类:编程语言   时间:2015-08-19 20:31:05    阅读次数:142
Swift开发教程--有关图片处理的一些有用函数
/**     *  切圆形图片     *     *  @param image:UIImage     *  @param inset:CGFloat     *     *  @return UIImage     */     class func circleImage(image:UIImage,inset:CGFloat) -> UIImage {      ...
分类:编程语言   时间:2015-08-11 16:17:59    阅读次数:243
Swift开发教程--如何对字符串进行md5加密
在swift工程中随便建一个objective-c类,会提示你生成一个Bridging-Header,点YES,然后删除刚才建立的objective-c类,只留下[工程名]-Bridging-Header.h文件。 在[工程名]-Bridging-Header.h文件写入: #import 然后写一个生成md5的函数: class func md5String(str:String)...
分类:编程语言   时间:2015-07-29 14:09:00    阅读次数:187
26条   1 2 3 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!