随笔分类 -  iOS

对于iOS框架编程的一些积累
摘要:在iOS中蓝牙恢复连接有三种方式,这里主要讲解其中一种:与在过去的一段时间连接的过的设备重新连接。基本思路:1、当程序退出时,将已连接设备的identifier(NSUUID)保存。2、在程序恢复的时候,通过已保存的identifier查找周边是否有这个设备。3、如果有,则尝试重新连接这个设备。具体... 阅读全文

posted @ 2015-05-25 16:35 SCaptain 阅读(1942) 评论(0) 推荐(1)

摘要:1、給iPhone安裝google map app,因為之後會使用這個程序進行導航2、在自己的App中需要進行導航的地方,加入下列代碼if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgo... 阅读全文

posted @ 2015-01-07 19:07 SCaptain 阅读(1018) 评论(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 阅读(269) 评论(0) 推荐(0)

摘要:在autolayout中加入每个view的weight,这样相互之间的关系就更明确,比如: double iconViewWeight = 1; double titleLabelWeight = 12; double timeLabelWeight = 3; doubl... 阅读全文

posted @ 2014-12-18 21:36 SCaptain 阅读(310) 评论(0) 推荐(0)

摘要:NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"152XXXX2761"];[[UIApplication sharedApplication] openURL:[NSURL URLW... 阅读全文

posted @ 2014-12-15 19:50 SCaptain 阅读(158) 评论(0) 推荐(0)

摘要:1、UIImageView 设置内容的Mode的方法imageView.contentMode = UIViewContentModeScaleAspectFill;2、UICollectionViewCell Custom的方法CustomUICollectionViewCell.m- (id)i... 阅读全文

posted @ 2014-12-10 23:03 SCaptain 阅读(361) 评论(0) 推荐(0)

摘要:一.默认状态单行,不可获取用户点击事件,UIViewContentModeRedraw模式,改变就重绘.二.相关属性与函数1.文本属性text // label 显示的文字font // text 的字体,值不可以是nil,否则异常textColor // te... 阅读全文

posted @ 2014-12-03 08:53 SCaptain 阅读(350) 评论(0) 推荐(0)

摘要:The UIViewController object is one of the most used objects available in the iOS SDK. It’s important to understand the lifecycle events of this contro... 阅读全文

posted @ 2014-11-24 14:45 SCaptain 阅读(270) 评论(0) 推荐(0)

摘要:$ git rm --cached iLedger.xcodeproj/project.xcworkspace/xcuserdata/Alex.xcuserdatad/UserInterfaceState.xcuserstate$ git commit -m "Removed the stupid ... 阅读全文

posted @ 2014-11-21 14:58 SCaptain 阅读(164) 评论(0) 推荐(0)

摘要:监测tableview停止滚动- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{ if (!decelerate) { [self scrolli... 阅读全文

posted @ 2014-11-19 21:37 SCaptain 阅读(307) 评论(0) 推荐(0)

摘要:注册一个Notification [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedNotification:) ... 阅读全文

posted @ 2014-11-17 16:57 SCaptain 阅读(117) 评论(0) 推荐(0)

摘要:根据 Google 提供的start for google map sdk for iOS进行一系列的设置,这里就不多说了https://developers.google.com/maps/documentation/ios/startgoogle map sdk for iOS提供了全套的定位和... 阅读全文

posted @ 2014-11-07 16:41 SCaptain 阅读(696) 评论(0) 推荐(0)

导航