摘要:
在iOS中蓝牙恢复连接有三种方式,这里主要讲解其中一种:与在过去的一段时间连接的过的设备重新连接。基本思路:1、当程序退出时,将已连接设备的identifier(NSUUID)保存。2、在程序恢复的时候,通过已保存的identifier查找周边是否有这个设备。3、如果有,则尝试重新连接这个设备。具体... 阅读全文
摘要:
查看本地分支$ git branch查看远程分支加上-a参数可以查看远程分支,远程分支会用红色表示出来(如果你开了颜色支持的话):$ git branch -a master remote tungway v1.52* zrong remotes/origin/master remote... 阅读全文
摘要:
1、給iPhone安裝google map app,因為之後會使用這個程序進行導航2、在自己的App中需要進行導航的地方,加入下列代碼if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgo... 阅读全文
摘要:
void arraySort3() { Student *stu1 = [Student studentWithFirstname:@"MingJie" lastname:@"Li"]; Student *stu2 = [Student studentWithFirstname:... 阅读全文
摘要:
1、存照片 1 - (void)setPhoto:(UIImage *)image{ 2 UIImage *image = image; 3 4 5 //0.5代表的是压缩率,1为不压缩,图像质量最高,0为最高压缩,图像质量最低 6 NSData *imageDat... 阅读全文
摘要:
在autolayout中加入每个view的weight,这样相互之间的关系就更明确,比如: double iconViewWeight = 1; double titleLabelWeight = 12; double timeLabelWeight = 3; doubl... 阅读全文
摘要:
NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"152XXXX2761"];[[UIApplication sharedApplication] openURL:[NSURL URLW... 阅读全文
摘要:
1、UIImageView 设置内容的Mode的方法imageView.contentMode = UIViewContentModeScaleAspectFill;2、UICollectionViewCell Custom的方法CustomUICollectionViewCell.m- (id)i... 阅读全文
摘要:
一.默认状态单行,不可获取用户点击事件,UIViewContentModeRedraw模式,改变就重绘.二.相关属性与函数1.文本属性text // label 显示的文字font // text 的字体,值不可以是nil,否则异常textColor // te... 阅读全文
摘要:
在gradle配置文件加入:android { packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-IN... 阅读全文