08 2015 档案
摘要:cd //项目文件git push -u origin master // 发布一个名origin 的mastergit push -u origin master // 发布一个名origin 的mastergit tag -m "Tag" tagName // 本地创建一个名为 tagName...
阅读全文
摘要:如果给控制设置 autolayout constrain 的话 要把优先级改成为 low 才可以 在代码里面修改frame 的值 否则修改了也无效
阅读全文
摘要:tableView 要是不设置成grouped 分区的最后一个会有很多的cellstoryBoard里面设置了
阅读全文
摘要:backBarButtomItem 这个属性在 navigation Controller 的前一级的视图里设置 在下一级的视图里面才会体现出 "返回" 按钮的名字出现不同 let backButton = UIBarButtonItem(title: "Back", sty...
阅读全文
摘要:class UILabelOverride: UILabel { override func textRectForBounds(bounds: CGRect, limitedToNumberOfLines numberOfLines: Int) -> CGRect { ...
阅读全文
摘要:2015-08-27 13:30:29.500 test[9379:578356] *** NSForwarding: warning: object 0x7fd19c017f30 of class 'test.PopUpPickerView' does not implement methodSi...
阅读全文
摘要:NSFontAttributeNameoverview 里面Attributed String Programming Guide standard attributeTable 1Table of standard attributesAttribute IdentifierValue Class...
阅读全文
摘要:用 self.tableView.sectionHeaderHeight = 35 self.tableView.sectionFooterHeight = 0设置的高度 第一个section 含有标题时 高度会比其它含有title的section高使用 TableViewDelegate 协议...
阅读全文
摘要:title 颜色 self.navigationController?.navigationBar.titleTextAttributes =[NSForegroundColorAttributeName: UIColor.whiteColor()] self.naviga...
阅读全文
摘要://1 UIGraphicsBeginImageContext(self.view.frame.size) //2 let path = UIBezierPath(ovalInRect: CGRect(x: 0, y: 0, width: ...
阅读全文
摘要:NSArray、NSString 等OC中实现的都是类类型Array、String 等Swift汇总实现的都是引用类型根据手册上讲的来说值类型在 传值 的通过拷贝出不同的实例来传值 改变一个实例的属性等并不会在其它实例上体现而 引用类型在 传值 的时候通过引用 相当于至拷贝了指针一样 不同变量所指向...
阅读全文
摘要:方法一: UIStatusBar 默认背景透明 所以可以通过把背景改成黑色来使字变成白色 在需要的试图的Controller 里面设置 self.navigationController?.navigationBar.barStyle = UIBarStyle.Black方法二...
阅读全文
摘要:self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]原来的UITextAttributeTextCol...
阅读全文
摘要:cd 到想要保存文件的本地文件夹git clone 地址比如git clone https://github.com/...然后 cd 这个克隆来的项目文件夹git checkout -f git上的版本标签比如git checkout -f git ReleaseLabelopen . // 可以...
阅读全文
摘要:动画12 basic principles of animationhttps://en.wikipedia.org/wiki/12_basic_principles_of_animationhttp://the12principles.tumblr.com GIFhttp://vimeo.com/...
阅读全文
摘要:在工程里面新建文件 Cocoa Touch Class 模版选对应的 比如 对 ImageView 扩展 就创建UIImageView 这个对应的类可以在 Identity Inspector 里面看默认的类名字import UIKit@IBDesignable // 添加这个实现StoryBoar...
阅读全文
摘要:fun f1(){}fun f2(){}func fetch() { Alamofire.request(.POST, url, parameters: params).responseJson { _,_,JSON,_ in f1() } f2() // 注1}这里的f2...
阅读全文
摘要:mixedjson_decode(string$json[,bool$assoc= false[,int$depth= 512[,int$options= 0]]] )当第二个参数为TRUE时 返回一个数组否则返回类element1;$element2 = $jsonData->element2;/...
阅读全文
摘要:因为PHP的json_encode()只能编码 UTF-8 格式所以图片的源码肯定是不可以直接编码输出的方法还在查
阅读全文
摘要:从手册上可以看到 这两个函数实质上是相同的。
阅读全文
摘要:1、 在 debug 的时候总是显示 无法修改header 信息因为header 已经在line 1发送了可是line 1 就只有 一个 <php?后来发现在<php?前面竟然有个空格... 哎..2、复制header的时候尽量从同一个地方复制 要不然 Content-Length 不一样可能直接没...
阅读全文
摘要:自己创建Cocoapods教程(包括上传Github) http://www.raywenderlich.com/99386/create-cocoapod-swift //原版 http://www.cocoachina.com/swift/20150806/12831.html //中文 UIS
阅读全文
摘要:数学原理推导: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 -...
阅读全文

浙公网安备 33010602011771号