2015年5月25日

摘要: 在iOS中蓝牙恢复连接有三种方式,这里主要讲解其中一种:与在过去的一段时间连接的过的设备重新连接。基本思路:1、当程序退出时,将已连接设备的identifier(NSUUID)保存。2、在程序恢复的时候,通过已保存的identifier查找周边是否有这个设备。3、如果有,则尝试重新连接这个设备。具体... 阅读全文
posted @ 2015-05-25 16:35 SCaptain 阅读(1851) 评论(0) 推荐(1) 编辑

2015年1月21日

摘要: 查看本地分支$ git branch查看远程分支加上-a参数可以查看远程分支,远程分支会用红色表示出来(如果你开了颜色支持的话):$ git branch -a master remote tungway v1.52* zrong remotes/origin/master remote... 阅读全文
posted @ 2015-01-21 01:01 SCaptain 阅读(1775) 评论(0) 推荐(0) 编辑

2015年1月7日

摘要: 1、給iPhone安裝google map app,因為之後會使用這個程序進行導航2、在自己的App中需要進行導航的地方,加入下列代碼if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgo... 阅读全文
posted @ 2015-01-07 19:07 SCaptain 阅读(958) 评论(0) 推荐(0) 编辑

2015年1月6日

摘要: void arraySort3() { Student *stu1 = [Student studentWithFirstname:@"MingJie" lastname:@"Li"]; Student *stu2 = [Student studentWithFirstname:... 阅读全文
posted @ 2015-01-06 21:57 SCaptain 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1、存照片 1 - (void)setPhoto:(UIImage *)image{ 2 UIImage *image = image; 3 4 5 //0.5代表的是压缩率,1为不压缩,图像质量最高,0为最高压缩,图像质量最低 6 NSData *imageDat... 阅读全文
posted @ 2015-01-06 10:39 SCaptain 阅读(261) 评论(0) 推荐(0) 编辑

2014年12月18日

摘要: 在autolayout中加入每个view的weight,这样相互之间的关系就更明确,比如: double iconViewWeight = 1; double titleLabelWeight = 12; double timeLabelWeight = 3; doubl... 阅读全文
posted @ 2014-12-18 21:36 SCaptain 阅读(292) 评论(0) 推荐(0) 编辑

2014年12月15日

摘要: NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"152XXXX2761"];[[UIApplication sharedApplication] openURL:[NSURL URLW... 阅读全文
posted @ 2014-12-15 19:50 SCaptain 阅读(151) 评论(0) 推荐(0) 编辑

2014年12月10日

摘要: 1、UIImageView 设置内容的Mode的方法imageView.contentMode = UIViewContentModeScaleAspectFill;2、UICollectionViewCell Custom的方法CustomUICollectionViewCell.m- (id)i... 阅读全文
posted @ 2014-12-10 23:03 SCaptain 阅读(348) 评论(0) 推荐(0) 编辑

2014年12月3日

摘要: 一.默认状态单行,不可获取用户点击事件,UIViewContentModeRedraw模式,改变就重绘.二.相关属性与函数1.文本属性text // label 显示的文字font // text 的字体,值不可以是nil,否则异常textColor // te... 阅读全文
posted @ 2014-12-03 08:53 SCaptain 阅读(343) 评论(0) 推荐(0) 编辑

2014年12月1日

摘要: 在gradle配置文件加入:android { packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-IN... 阅读全文
posted @ 2014-12-01 12:59 SCaptain 阅读(599) 评论(0) 推荐(0) 编辑

导航