- 博客(5)
- 资源 (3)
- 收藏
- 关注
原创 switf 字符串转 json数据 ,json数据再转化为数组
字符串的处理: 按字符替换字符let jsonStr = str.stringByReplacingOccurrencesOfString("'", withString: "\"", options: NSStringCompareOptions.LiteralSearch, range: nil)NSString 转换成NSData 对象 jsonStr = “[{
2016-03-16 14:00:13 376
原创 swift tableview的左滑删除,左滑显示自定义图片。
1、是否允许tableview的cell能不能编辑override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool{ return true }2、设置原始的删除按钮的titleoverride func t
2016-03-14 11:02:14 4960
原创 swift 网络请求
1、Alamofire(swift 网络请求库):http://pan.baidu.com/s/1hrvA9xU2、使用: (1)引入代理文件名:HttpProtocol (2)声明请求的变量:var request = HttpRequest() (3) post 传字符串请求: let bodyStr = NSString(forma
2016-03-14 10:43:11 703
原创 swift 设置navigationBar的背景颜色和字体颜色
设置navigationBar中的背景颜色、字体颜色、字体大小。在appdelegate文件中1、设置背景颜色: UINavigationBar.appearance().barTintColor = UIColor(red: 0.0/255.0, green:122.0/255.0, blue: 204.0/255.0, alpha: 1.0)2、设置字体颜
2016-03-14 10:27:16 1208
原创 swift 设置statusBar的文字颜色
1、Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2‘、在viewDidLoad或appdelegate文件中加一句 UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent;这样就可以把默认的黑色改为白色。
2016-03-14 10:12:14 552
多个图片的预览 以及 双击、拖拽、捏合 放大
2020-01-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人