摘要: 传感器总结传感器类型作用环境光传感器感应周边环境光线的强弱(自动调节屏幕亮度)距离传感器感应是否有其他物体靠近设备屏幕(打电话自动锁屏)磁力计传感器感应周边的磁场(合盖锁屏)内部温度传感器感应设备内部的温度(提醒用户降温,防止损伤设备)湿度传感器感应设备是否进水(方便维修人员)陀螺仪感应设备的持握方... 阅读全文
posted @ 2015-05-15 17:56 pocket_live 阅读(222) 评论(0) 推荐(1) 编辑
摘要: 首先包含这两个头文件以及加入对应的框架#import #import 添加声音通知的监听[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(volumeChanged:) name:@"AVSystemC... 阅读全文
posted @ 2015-05-15 17:55 pocket_live 阅读(731) 评论(0) 推荐(1) 编辑
摘要: lineBreakMode:设置标签文字过长时的显示方式。label.lineBreakMode=NSLineBreakByCharWrapping;//以字符为显示单位显示,后面部分省略不显示。label.lineBreakMode=NSLineBreakByClipping;//剪切与文本宽度相... 阅读全文
posted @ 2015-05-15 17:50 pocket_live 阅读(285) 评论(0) 推荐(1) 编辑
摘要: 目前分为四个推送:用户推送,本地推送,远程推送,地理位置推送。if(IS_IOS8){//1.创建消息上面要添加的动作(按钮的形式显示出来)UIMutableUserNotificationAction*action=[[UIMutableUserNotificationActionalloc]in... 阅读全文
posted @ 2015-05-14 18:03 pocket_live 阅读(295) 评论(0) 推荐(0) 编辑
摘要: AudioServicesAddSystemSoundCompletion(kSystemSoundID_Vibrate, NULL, NULL, systemAudioCallback, NULL);AudioServicesRemoveSystemSoundCompletion(kSystemS... 阅读全文
posted @ 2015-05-08 18:31 pocket_live 阅读(603) 评论(0) 推荐(0) 编辑
摘要: UISegmentedControl/*typedef enum {UISegmentedControlStylePlain,UISegmentedControlStyleBordered,UISegmentedControlStyleBar,UISegmentedControlStyleBezel... 阅读全文
posted @ 2015-05-07 18:06 pocket_live 阅读(386) 评论(0) 推荐(0) 编辑
摘要: iOS 锁屏判断应用程序的单例类对象中得到应用程序委托的对象UIApplicationDelegate* myDelegate = [[UIApplication sharedApplication] delegate];UIApplication接收到所有的系统事件和生命周期事件时,都会把事件传递... 阅读全文
posted @ 2015-05-06 18:30 pocket_live 阅读(1696) 评论(0) 推荐(0) 编辑
摘要: UIwindow 的学习层级关系测试代码:@interface AppDelegate ()@property (nonatomic, strong) UIWindow *arlewWindow;@property (nonatomic, strong) UIWindow *norWindow;@p... 阅读全文
posted @ 2015-05-05 18:39 pocket_live 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 显示 Mac 隐藏文件的命令: defaults write com.apple.finder AppleShowAllFiles -bool true隐藏 Mac 隐藏文件的命令: defaults write com.apple.finder AppleShowAllFiles -boo... 阅读全文
posted @ 2015-05-05 18:32 pocket_live 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 获取iOS系统版本 --- UIDevice的使用UIDevice类是一个单例,其唯一的实例( [UIDevice currentDevice] ) 代表了当前使用的设备。通过这个实例,可以获得设备的相关信息(包括系统名称,版本号,设备模式等等)。也可以使用使用该实例来监测设备的特征(比如物理方向)... 阅读全文
posted @ 2015-05-04 18:14 pocket_live 阅读(257) 评论(0) 推荐(0) 编辑