摘要: //距离传感器,以注册通知的形式来实现的#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]... 阅读全文
posted @ 2015-07-19 21:00 汤冉阳 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.正则表达式在编写处理字符串的程序时,经常会有查找符合某些复杂规则的字符串的需要。正则表达式就是用于描述这些规则的工具。换句话说,正则表达式就是记录文本规则的代码正则表达式是对字符串操作的一种逻辑公式,用事先定义好的一些特定字符、及这些特定字符的组合,组成一个"规则字符串",这个"规则字符串"用来... 阅读全文
posted @ 2015-07-18 19:50 汤冉阳 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1.控制器代码#import "ViewController.h"#import "NSAttributedString+Emoji.h"@interface ViewController ()@property(nonatomic,strong)UILabel*labelText;@end@imp... 阅读全文
posted @ 2015-07-18 19:29 汤冉阳 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 文一我从苹果文档中得知,一般的应用在进入后台的时候可以获取一定时间来运行相关任务,也就是说可以在后台运行一小段时间。还有三种类型的可以运行在后以,1.音乐2.location3.voip文二在IOS后台执行是本文要介绍的内容,大多数应用程序进入后台状态不久后转入暂停状态。在这种状态下,应用程序不执行... 阅读全文
posted @ 2015-07-18 07:15 汤冉阳 阅读(893) 评论(0) 推荐(0) 编辑
摘要: 1.添加AVFoundation.framework框架2,控制器中实现//第一步添加AVFoundation.framework框架#import "ViewController.h"#import #import "RYPreView.h"@interface ViewController ()... 阅读全文
posted @ 2015-07-18 07:01 汤冉阳 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1.添加AddressBookUI.framework框架2控制器中实现#import "ViewController.h"#import @interface ViewController ()@end@implementation ViewController- (void)viewDidLoa... 阅读全文
posted @ 2015-07-18 06:13 汤冉阳 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1,添加框架AddressBook.framework2,请求权限认证,在Appdelegate.m文件中- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)la... 阅读全文
posted @ 2015-07-18 06:12 汤冉阳 阅读(320) 评论(0) 推荐(0) 编辑
摘要: //使用第三方框架:RHAddressBook,在github上搜索,按照要求把工程添加到当前项目#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewD... 阅读全文
posted @ 2015-07-18 06:06 汤冉阳 阅读(197) 评论(0) 推荐(0) 编辑
摘要: ios广告只需要添加iAd.framework框架添加广告控件ADBannerView,在控制器中设置广告控件代理即可,广告会有苹果官方自动推送使用注意:动画控件显示前要有宽高可以添加控件显示动画(为了更好的用户体验)- (void)bannerViewDidLoadAd:(ADBannerView... 阅读全文
posted @ 2015-07-17 22:59 汤冉阳 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1.添加框架,storeKit.framework 需要真机调试/*内购五步: 1.请求可销售商品的列表 2.展示课销售的商品 3.点击购买 4.开具小票 5.创建交易对象并添加到交易队列 6.创建监听对象,监听交易队列中交易对象的交易状态 7.程序结束移除监听... 阅读全文
posted @ 2015-07-17 22:51 汤冉阳 阅读(206) 评论(0) 推荐(0) 编辑