[整理]Swift的代理delegate,协议protocol
crifan 9年前 (2015-09-26) 3788浏览 0评论
[protocol协议] protocol:只定义,不实现 -》定义,只是为了说明,能做什么,即只有函数定义,没有函数实现 -》其他的,遵循,符合,此protocol协议的,类,结构体,枚举,自己去实现 -》任何实现了此协议的类型,都可以叫做 con...
iOS Framework
crifan 9年前 (2015-09-26) 3788浏览 0评论
[protocol协议] protocol:只定义,不实现 -》定义,只是为了说明,能做什么,即只有函数定义,没有函数实现 -》其他的,遵循,符合,此protocol协议的,类,结构体,枚举,自己去实现 -》任何实现了此协议的类型,都可以叫做 con...
crifan 9年前 (2015-09-25) 3489浏览 0评论
【背景】 xcode 7中选中一段代码后,想要变成注释,右击后: 结果都找不到这个功能。 【解决过程】 1.右键,是找到半天,没有。 2.xcode中的菜单,也找了半天,都没有看到有什么 comments之类的功能。 3.搜: xcode ...
crifan 9年前 (2015-09-25) 4934浏览 0评论
【背景】 想要搞清楚,用Swift去创建页面时,看到别人用的代码: init() { super.init(nibName: nil, bundle: nil) } required init?(cod...
crifan 9年前 (2015-09-23) 4468浏览 0评论
【背景】 Swift中的代码: if let handler = blocks.completionHandler { var resp = HTTPResponse() ...
crifan 9年前 (2015-09-23) 3128浏览 0评论
【背景】 mac中的xcode升级到最新的7.0了,支持playground。 所以去试试,在playground中,试试折腾swift语言。 【折腾过程】 1.Xcode-》File-》New-》Playground 2.选择新Pla...
crifan 9年前 (2015-09-23) 4850浏览 0评论
【问题】 swift中,在把UIActionSheet换成了UIAlertController之后,代码变成: func changeHeadAction(button : UIButton) { print("ch...
crifan 9年前 (2015-09-23) 3213浏览 0评论
【背景】 尝试用swift去创建新的页面,参考别人的代码,去写了个ViewControoler文件 import UIKit class MyWalletViewController: UIViewController, UITableViewD...
crifan 9年前 (2015-09-23) 2430浏览 0评论
此处整理关于Swift的相关教程和资料。 不定期更新。 【Swift教程】 官网的教程: The Swift Programming Language: About Swift The Swift Programming Langu...
crifan 9年前 (2015-09-19) 2651浏览 0评论
【问题】 swift代码出错: controller/tabcontroller/mycontroller/PersonalViewController.swift:26:63: ‘UIActionSheet’ was dep...
crifan 9年前 (2015-09-19) 4240浏览 0评论
【问题】 将旧的swift代码,转换到最新的swift的语法: if let encoded = urlVal.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncodin...