摘要: 枚举类型的格式 enum direction { case North case South case East case West } 一个枚举中被定义的值是枚举的成员值(例如:North ,South,East,West)。 定义一个新的枚举类型,它的名字必须以一个大写字母开头。 我们用关键字c 阅读全文
posted @ 2017-01-20 14:11 风雨彩 阅读(161) 评论(0) 推荐(0)
摘要: 1.根据手机机型来分:需要120X120 和 180X180的图标 2.根据手机系统来分: base: 40pt, 需要 @2x, @3x,得出:80 x 80, 120 x 120 base: 29pt, 需要 @2x, @3x,得出:58 x 58, 87 x 87 base: 60pt, 需要 阅读全文
posted @ 2017-01-12 10:25 风雨彩 阅读(209) 评论(0) 推荐(0)
摘要: git add . : 将所有修改过的工作文件提交暂存区 git commit -am 'new' : 将修改过的文件进行记录 git push origin dev : 将项目推送到dev分只能上 git branch + 分支名 :创建分支 git checkout + 分支名 :切换分支 gi 阅读全文
posted @ 2017-01-03 18:59 风雨彩 阅读(117) 评论(0) 推荐(0)
摘要: 如果我们想提交一些备注信息,会想到用textFiled和textView两种控件去实现 1.提醒文字是textFiled的特有属性,但是textFiled显示文本只有一行,不能实现我们输入较多文字的情况 2.textView可以自动适配多文字输入,但是没有提醒文字,这也不符合我们设计的需求 下面就有 阅读全文
posted @ 2016-12-31 19:55 风雨彩 阅读(247) 评论(0) 推荐(0)
摘要: 委托是一种设计模式,它允许类或结构体将一些需要它们负责的功能交由给其他的类型 委托模式的实现很简单: 定义协议来封装那些需要被委托的函数和方法,使其遵循着拥有这些被委托的函数和方法 //制定需要遵守的协议,制定协议遵守NSObjectProtocol协议 protocol bottomViewDel 阅读全文
posted @ 2016-12-28 18:49 风雨彩 阅读(339) 评论(0) 推荐(0)
摘要: import UIKit class ViewController: UIViewController { var button : UIButton! var array = NSMutableArray() override func viewDidLoad() { super.viewDidL 阅读全文
posted @ 2016-12-27 09:11 风雨彩 阅读(379) 评论(0) 推荐(0)
摘要: //字符串的替换 let ReplaceString = "http://www.aimonkey。cn" let FilterReplace = ReplaceString.replacingOccurrences(of: "。", with: ".") print(FilterReplace) 阅读全文
posted @ 2016-12-23 14:30 风雨彩 阅读(2645) 评论(0) 推荐(0)
摘要: //UI界面代码 import UIKit class CameraView: UIView { var cameraButton : UIButton! var photoButton : UIButton! var image : UIImageView! override init(frame 阅读全文
posted @ 2016-12-17 15:47 风雨彩 阅读(3775) 评论(0) 推荐(0)
摘要: //Swift 提醒框 let alert = UIAlertController(title:"提示", message:"用户名或密码错误", preferredStyle: .alert) let cancel = UIAlertAction(title: "取消", style: .canc 阅读全文
posted @ 2016-12-14 21:01 风雨彩 阅读(2629) 评论(0) 推荐(0)
摘要: // let bt = UIButton(frame:CGRectMake(10,20,50,50)) let button = UIButton(frame:CGRectMake(10, 150, 100, 30)) //初始化按钮和设置按钮位置与大小 button.backgroundColor 阅读全文
posted @ 2016-07-14 18:53 风雨彩 阅读(250) 评论(0) 推荐(0)