10 2015 档案

摘要://通知的使用1.发通知。(以这条通知为例,通知名字:nickNameNotification通知参数:title)NSNotificationCenter.defaultCenter().postNotificationName("nickNameNotification", object: ti... 阅读全文
posted @ 2015-10-28 11:40 brance 阅读(872) 评论(0) 推荐(0) 编辑
摘要:废话不多说了,直接贴我今天写的代码吧:如果新手有什么不懂的,可以发我邮箱。//// singleInfo.swift 个人信息// Housekeeper//// Created by 卢洋 on 15/10/27.// Copyright © 2015年 奈文摩尔. All rights... 阅读全文
posted @ 2015-10-27 19:14 brance 阅读(856) 评论(0) 推荐(1) 编辑
摘要:你们是否经常在浏览器输入请求地址解析遇到中文乱码的情况,今天我找到了一个好用的浏览器解析json网址,绝对好用。1.直接输入网址http://pro.jsonlint.com/2.输入要解析的json网址然后在该网址中输入http://www.omdbapi.com/?t=mission&y=&pl... 阅读全文
posted @ 2015-10-25 13:10 brance 阅读(2645) 评论(2) 推荐(1) 编辑
摘要:// 手机号验证正则表达式 1 func validateMobile(phoneNum:String)-> Bool { 2 3 // 手机号以 13 14 15 18 开头 八个 \d 数字字符 4 5 let phoneRegex = "^((13[0-9])|(17[... 阅读全文
posted @ 2015-10-21 20:00 brance 阅读(841) 评论(0) 推荐(0) 编辑
摘要:text.characters.count(记得text一定要是String类型) 阅读全文
posted @ 2015-10-21 19:55 brance 阅读(349) 评论(0) 推荐(0) 编辑
摘要://1.添加返回按钮 func addBackBtn(){ let leftBtn:UIBarButtonItem=UIBarButtonItem(title: "返回", style: UIBarButtonItemStyle.Plain, target: self, action: "ac... 阅读全文
posted @ 2015-10-21 19:44 brance 阅读(5140) 评论(0) 推荐(0) 编辑
摘要://1.初始化UITextField let userName=UITextField(frame: CGRectMake(0, 100, 100, 100));//2.将文本框userName添加到当前视图中 self.view.addSubview(userName);//3.文本框默认显... 阅读全文
posted @ 2015-10-21 19:32 brance 阅读(2199) 评论(0) 推荐(0) 编辑
摘要:今天在底部工具栏添加图片时发现图片模糊而且有锯齿,开始一直以为是美工给的图片有问题,后来发现是要设置两种图片:比如 index.png(默认30 * 30),indexSelected(选中后的图片 30 * 30);index@2x(默认 60 * 60),indexSelected@2x(选中后... 阅读全文
posted @ 2015-10-21 18:59 brance 阅读(701) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示