摘要: // 将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;// 将像素point从view中转换到当前视图中,返回在当前视图中的像素值-... 阅读全文
posted @ 2016-01-08 10:59 御剑青冥 阅读(110) 评论(0) 推荐(0) 编辑
摘要: NSNotificationCenter消息通信作用:NSNotificationCenter是专门供程序中不同类间的消息通信而设置的.注册通知:即要在什么地方接受消息[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@sele... 阅读全文
posted @ 2016-01-08 10:59 御剑青冥 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 // 复制文字到粘贴板 2 UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 3 pasteboard.string = self.label.text; 阅读全文
posted @ 2016-01-08 10:57 御剑青冥 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1 #pragma mark - calculate distance 根据2个经纬度计算距离 2 3 #define PI 3.14159265358979323 4 +(double) CalculationDistanceOther_Lon1:(double)lon1 Other_Lat... 阅读全文
posted @ 2016-01-08 10:56 御剑青冥 阅读(218) 评论(0) 推荐(0) 编辑
摘要: NSDictionary *attribute = @{NSFontAttributeName: UIFont(14)}; CGRect labelRect = [string boundingRectWithSize:CGSizeMake(200,2000) options:(N... 阅读全文
posted @ 2016-01-08 10:54 御剑青冥 阅读(166) 评论(0) 推荐(0) 编辑
摘要: UIBarButtonItem *backItem = [[[UIBarButtonItem alloc] init] autorelease]; backItem.title = @"返回"; self.navigationItem.backBarButtonItem = backItem; 阅读全文
posted @ 2016-01-08 10:52 御剑青冥 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 通过使用UIDevice:[[UIDevice currentDevice] systemName];[[UIDevice currentDevice] systemVersion];//os version[[UIDevice currentDevice] uniqueIdentifier];[[... 阅读全文
posted @ 2016-01-08 10:45 御剑青冥 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 如何调用系统声音?【iphone 调用系统铃声与震动功能】首先要在工程里加入Audio Toolbox framework这个库,然后在需要调用的文件里#import 最后在需要播放提示音的地方编写如下代码:AudioServicesPlaySystemSound(1000);//新邮件消息提示Au... 阅读全文
posted @ 2016-01-08 10:45 御剑青冥 阅读(197) 评论(0) 推荐(0) 编辑
摘要: NSDictionary*infoDict=[[NSBundlemainBundle]infoDictionary];NSString*versionNum=[infoDictobjectForKey:@"CFBundleVersion"];//版本名称NSString*appName=[infoD... 阅读全文
posted @ 2016-01-08 10:44 御剑青冥 阅读(190) 评论(0) 推荐(0) 编辑
摘要: NSURL*url=[NSURL URLWithString:@"prefs:root=WIFI"];[[UIApplication sharedApplication] openURL:url];And[font=]About — prefs:root=General&path=AboutAcce... 阅读全文
posted @ 2016-01-08 10:42 御剑青冥 阅读(239) 评论(0) 推荐(0) 编辑