随笔分类 -  iOS

摘要:UITableView上显示二级三级菜单的demo有很多,这里展示一个简单易复用的。 效果图: 代码:原理就是section的头作为展示的一级cell,section里的cell作为二级cell,通过section的状态(YES or NO)来控制是否显示section里的cell 阅读全文
posted @ 2016-03-23 22:59 Colaless 阅读(3474) 评论(0) 推荐(0)
摘要:最近搭见面尝试了下Masonry,感觉挺不错的,比手写frame快多了,又避免了storyboard和xib的复杂约束。 这是效果图 ps:以前看到这样的就愁死了,各种计算坐标,用Masonry分分钟的事。 代码:用的不是很熟练,有不少走了弯路的地方欢迎指正~~~~(>_<)~~~~ 阅读全文
posted @ 2016-03-23 22:20 Colaless 阅读(545) 评论(0) 推荐(0)
摘要:- (void)viewDidLoad { [super viewDidLoad]; /** * 轮播图 * * @return nil */ //图片数组 imageArr = @[@"scroll.png",@"record.png",@"state2.png"]; //scrollview的宽和高 ... 阅读全文
posted @ 2016-03-23 21:17 Colaless 阅读(1019) 评论(0) 推荐(0)
摘要://在DataManager.h里 #import @class DataManager; //block回调传值 /** * 请求成功回调json数据 * * @param json json串 */ typedef void(^Success)(id json); /** * 请求失败回调错误信息 * * @param error error错误信息 */ t... 阅读全文
posted @ 2016-03-23 20:48 Colaless 阅读(7520) 评论(0) 推荐(0)
摘要:ps :插件路径存放在~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/目录下 一、Alcatraz是一款管理Xcode插件的管理工具 安装:在命令行中输入如下指令:curl -fsSL https://raw.github. 阅读全文
posted @ 2016-03-16 15:51 Colaless 阅读(303) 评论(0) 推荐(0)
摘要:一、安装 1、github下载VVDocumenter  https://github.com/onevcat/VVDocumenter-Xcode.git 2、终端输入defaults read /Applications/Xcode.app/Contents/Info DVTPlugInComp 阅读全文
posted @ 2016-03-14 14:14 Colaless 阅读(312) 评论(0) 推荐(0)
摘要:一、安装 1、github上下载地址:https://github.com/tomaz/appledoc.git 2、下载之后,终端执行 cd /users/你的位置/desktop/appledoc 进入appledoc文件 3、终端执行 sudo sh install-appledoc.sh 进 阅读全文
posted @ 2016-03-14 14:01 Colaless 阅读(964) 评论(0) 推荐(0)
摘要:(转)前言: 苹果在IOS 6系统之后开始支持BLE 4.0,iPhone4s,iPod 5,iPad 3等之后的机型开始内嵌BLE4.0硬件,因此在开发前请先确认你的开发环境符合上述要求,并且苹果在BLE4.0之后,对外部的连接设备已经不在需要MFI认证了,当然你的外设肯定得要有蓝牙4.0模块了 阅读全文
posted @ 2016-03-01 14:56 Colaless 阅读(1052) 评论(0) 推荐(0)
摘要:(转)iOS开发 之 可穿戴设备 蓝牙4.0 BLE 开发,iosble 1 前言 当前有越来越多的可穿戴设备使用了蓝牙4.0 BLE(Bluetooth Low Energy)。对于iOS开发而言,Apple之前专门推出CoreBluetooth的Framework来支持BLE的开发。对于硬件开发 阅读全文
posted @ 2016-03-01 14:54 Colaless 阅读(304) 评论(0) 推荐(0)
摘要://- (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize { UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scaleSize, image.size.height * scaleSize)); [image drawInRect:... 阅读全文
posted @ 2016-02-22 14:21 Colaless 阅读(1397) 评论(0) 推荐(0)
摘要:转载自http://my.oschina.net/joanfen/blog/194491摘要CornerStone是Mac OS X系统下非常好用的一款svn工具,至XCode5之后,本人觉得XCode5的Svn实在让人不得要领,而CornerStone配置虽不难,但也有几个需要注意的地方,分享给大... 阅读全文
posted @ 2016-01-26 09:43 Colaless 阅读(471) 评论(0) 推荐(0)
摘要:工具/原料 终端 工具/原料 终端 终端 终端 方法/步骤 打开终端,我们来创建一个代码仓库,用svnadmin create创建,如下例子,它在当前目录下创建了svndir文件夹。 我们进入svndir文件夹可以看到如下内容 conf文件夹是配置文件夹,里面有相关配置,先选择svnserve.co 阅读全文
posted @ 2016-01-26 09:30 Colaless 阅读(316) 评论(0) 推荐(0)
摘要:首先说下让自己的程序支持iPhone6和6+,第一种使用官方提供的launch screen.xib,这个直接看官方文档即可,这里不再多述;第二种方法是和之前iPhone5的类似,比较简单,为iPhone6和6+添加两张特殊的pngiPhone6:命名:Default-375w-667h@2x.pn... 阅读全文
posted @ 2016-01-25 15:40 Colaless 阅读(9249) 评论(0) 推荐(0)
摘要:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //标识符 static NSString *iden = @"cardsCe... 阅读全文
posted @ 2016-01-25 15:05 Colaless 阅读(2178) 评论(0) 推荐(0)
摘要://导入<BaiduMapAPI_Map/BMKMapComponent.h>库 #import "AppDelegate.h" #import "MainViewController.h" #import <BaiduMapAPI_Map/BMKMapComponent.h> //遵循代理 @in 阅读全文
posted @ 2016-01-25 14:43 Colaless 阅读(1654) 评论(0) 推荐(0)
摘要:转自阿福的博客,地址:http://blog.csdn.net/lizhongfu2013/article/details/26384029 一、概要 iOS开发时,项目中会引用许多第三方库,CocoaPods(https://github.com/CocoaPods/CocoaPods)可以用来方 阅读全文
posted @ 2015-12-31 09:02 Colaless 阅读(155) 评论(0) 推荐(0)
摘要:http://www.cocoachina.com/ios/20141219/10702.html前言1MagicNumber->autoresizingMask->autolayout以上是纯手写代码所经历的关于页面布局的三个时期在iphone1-iphone3gs时代 window的size固定... 阅读全文
posted @ 2015-11-12 15:27 Colaless 阅读(281) 评论(0) 推荐(0)
摘要:转载:http://duxinfeng.com/2015/07/14/iOS开源App整理/开源中国开源中国社区iPhone客户端。Appstore 下载地址:https://itunes.apple.com/cn/app/kai-yuan-zhong-guo/id524298520Git@OSC源... 阅读全文
posted @ 2015-11-12 14:51 Colaless 阅读(574) 评论(0) 推荐(0)
摘要:转载 http://www.cocoachina.com/ios/20151016/13715.html===================================================作者:董铂然授权本站转载。本文主要是说一些iOS9适配中出现的坑,如果只是要单纯的了解iOS9... 阅读全文
posted @ 2015-11-12 14:33 Colaless 阅读(189) 评论(0) 推荐(0)
摘要://创建scrollview self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0,self.frame.size.width,self.frame.size.height)]; self.scr... 阅读全文
posted @ 2015-01-05 01:39 Colaless 阅读(361) 评论(0) 推荐(0)