摘要: 数学原理推导:f(X) = X2- n ---公式(1)n为要求平方根的数值 比如 要求100的平方根 n = 100;所以问题就转换成了求f(X)的零点问题了f(Xn)的导数就是Xn+1 的斜率所以就有了公式所以 Xn+1 = Xn - f(Xn)/f'(Xn) 代入 公式1f(Xn)=X2 -... 阅读全文
posted @ 2015-08-02 17:39 baaingSheep 阅读(1494) 评论(0) 推荐(0) 编辑
摘要: 1 用Xcode打开Podfile文件 或者用命令行open -a Xcode Podfilepod update 阅读全文
posted @ 2015-07-22 15:37 baaingSheep 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 根据官方在Git上的描述https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking1、在所用的工程里面创建pod file 命令行操作示$ cd /Users/UserName/Documen... 阅读全文
posted @ 2015-07-19 18:22 baaingSheep 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 常见问题1、sudo gem install cocoapods 如下所示报错ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rub... 阅读全文
posted @ 2015-07-19 18:03 baaingSheep 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Managing Accessory ViewsaccessoryTypePropertyThe type of standard accessory view the cell should use (normal state).Cell使用的标准附属视图类型DeclarationSWIFTvar... 阅读全文
posted @ 2015-07-01 11:34 baaingSheep 阅读(366) 评论(0) 推荐(0) 编辑
摘要: TheUIApplicationclass provides a centralized point of control and coordination for apps running on iOS. Every app must have exactly one instance ofUIA... 阅读全文
posted @ 2015-05-31 22:22 baaingSheep 阅读(144) 评论(0) 推荐(0) 编辑
摘要: AUIAlertControllerobject displays an alert message to the user. This class replaces theUIActionSheetandUIAlertViewclasses for displaying alerts. After... 阅读全文
posted @ 2015-05-31 17:44 baaingSheep 阅读(140) 评论(0) 推荐(0) 编辑
摘要: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { //所有Segue被调用的时候都会触发这个函数 // 可以根据Segue 的 Identifier 来区别} if let index ... 阅读全文
posted @ 2015-05-30 16:25 baaingSheep 阅读(118) 评论(0) 推荐(0) 编辑
摘要: func textFieldShouldReturn(textField: UITextField) -> Bool { textField.resignFirstResponder() //由于delegate 的原因 所有方法跟delegate都是相对的 ... 阅读全文
posted @ 2015-05-30 16:04 baaingSheep 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 默认参数的内存分配在函数一开始的时候就已经完成 所以后面多次调用的默认参数其实是同一个参数 所以多次调用也只是对同一个默认参数进行修改def addNumber(L=[]): L.append(3) return Lprint addNumber()print addNumber()[3... 阅读全文
posted @ 2015-03-10 12:38 baaingSheep 阅读(194) 评论(0) 推荐(0) 编辑