- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 循环播放系统提示音
苹果设备中经常要用到提示声音,提示声音最好用SystemSoundID,因为可以根据系统设置自动识别是否在播放声音的时候振动。这里演示的是循环播放提示声音:- (void)playAlarmSound { NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:type]; //组装并播放音效 S
2017-10-19 11:56:08
923
原创 IOS 设备常亮
// 设备常亮 [UIApplication sharedApplication].idleTimerDisabled = YES;// 关闭设备常亮 [UIApplication sharedApplication].idleTimerDisabled = NO;
2015-07-27 15:31:44
496
原创 iOS应用推到后台继续执行
@interface AppDelegate : UIResponder { __block UIBackgroundTaskIdentifier _bgTask;}@property (nonatomic, strong) NSTimer * pushTimer;@end在AppDelegate.m中实现
2015-07-14 16:10:27
580
原创 判断电话号码是否正确
+(BOOL)isValidateTelNumber:(NSString *)number { NSString *strRegex = @"^((13[0-9])|14[0-9]|15[0-9]|17[0-9]|18[0-9])\\d{8}$"; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self
2015-07-14 09:50:54
662
原创 查询app包的uuid
每一个 xx.app 和 xx.app.dSYM 文件都有对应的 UUID,crash 文件也有自己的 UUID,只要这三个文件的 UUID 一致,我们就可以通过他们解析出正确的错误函数信息了。1.查看 xx.app 文件的 UUID,terminal 中输入命令 :dwarfdump --uuid xx.app/xx (xx代表你的项目名)2.查看 xx.app.dSYM 文件的
2015-07-10 11:10:16
2490
原创 iOS判断字符串是否为汉字
+(BOOL)is_Chinese:(NSString *)str{ for(int i=0; i int comp = [str characterAtIndex:i]; if( comp > 0x4e00 && comp { return YES; }
2015-07-09 14:39:12
942
原创 iOS获取系统语言
+(NSString *)currentlanguage{static NSString *languge = nil;if (!languge) {// NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];// NSArray *languages = [defaults objectForKey:
2015-07-09 14:26:55
667
原创 判断系统时间格式
+(BOOL)is24Hour{ NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateStyle:NSDateFormatterNoStyle]; [formatter setTimeStyle:NSDateFormatterShortStyle]; NSString *dateString
2015-07-09 14:19:20
414
转载 下拉 放大tableview上方 图片
- (void)updateImg { CGFloat yOffset =_tableView.contentOffset.y; if (yOffset 0) { CGFloat factor = ((ABS(yOffset)+ImageHeight)*ImageWidth)/ImageHeigh
2014-06-25 11:36:21
660
转载 iPhone开源项目汇总(更新版)
扫描wifi信息:http://code.google.com/p/uwecaugmentedrealityproject/http://code.google.com/p/iphone-wireless/条形码扫描:http://zbar.sourceforge.net/iphone/sdkdoc/install.htmltcp/ip的通讯协议:h
2013-05-03 16:02:22
443
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人