摘要: 1 #import 2 3 @interface HMFileDownloader : NSObject 4 /** 5 * 所需要下载文件的远程URL(连接服务器的路径) 6 */ 7 @property (nonatomic, copy) NSString *url; ... 阅读全文
posted @ 2016-01-25 18:51 xiaocaoera 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 @property (weak, nonatomic) IBOutlet UIProgressView *progressView; 5 /** 6... 阅读全文
posted @ 2016-01-25 18:47 xiaocaoera 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 @property (weak, nonatomic) IBOutlet UIProgressView *progressView; 5 /** 6... 阅读全文
posted @ 2016-01-25 18:44 xiaocaoera 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 1 #import "HMViewController.h" 2 #import "MBProgressHUD+MJ.h" 3 4 @interface HMViewController () 5 @property (weak, nonatomic) IBOutlet UITextField ... 阅读全文
posted @ 2016-01-25 16:45 xiaocaoera 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1 #import "HMViewController.h" 2 #import "MBProgressHUD+MJ.h" 3 4 @interface HMViewController () 5 @property (weak, nonatomic) IBOutlet UIText... 阅读全文
posted @ 2016-01-25 16:42 xiaocaoera 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1 #import "HMViewController.h" 2 3 @interface HMViewController () 4 @property (weak, nonatomic) IBOutlet UIImageView *imageView1; 5 @property (... 阅读全文
posted @ 2016-01-25 15:46 xiaocaoera 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 2 { 3 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORI... 阅读全文
posted @ 2016-01-25 15:38 xiaocaoera 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 1 @implementation HMViewController 2 3 - (void)viewDidLoad 4 { 5 [super viewDidLoad]; 6 7 [self performSelectorInBackground:@sel... 阅读全文
posted @ 2016-01-25 15:24 xiaocaoera 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 为了提高应用的用户体验,经常需要邀请用户对应用进行评分应用评分无非就是跳转到AppStore展示自己的应用,然后由用户自己撰写评论如何跳转到AppStore,并且展示自己的应用方法1 NSString *appid = @"444934666"; NSString *str = [NSStrin... 阅读全文
posted @ 2016-01-25 14:30 xiaocaoera 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 有时候,需要在本应用中打开其他应用,比如从A应用中跳转到B应用首先,B应用得有自己的URL地址(在Info.plist中配置)B应用的URL地址就是:mj://ios.itcast.cn 接着在A应用中使用UIApplication完成跳转 NSURL *url = [NSURL URLWith... 阅读全文
posted @ 2016-01-25 14:28 xiaocaoera 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 如果想打开一些常见文件,比如html、txt、PDF、PPT等,都可以使用UIWebView打开只需要告诉UIWebView文件的URL即可至于打开一个远程的共享资源,比如http协议的,也可以调用系统自带的Safari浏览器:NSURL *url = [NSURL URLWithString:@”... 阅读全文
posted @ 2016-01-25 14:17 xiaocaoera 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1 用自带的邮件客户端,发完邮件后不会自动回到原应用 2 NSURL *url = [NSURL URLWithString:@"mailto://10010@qq.com"]; 3 [[UIApplication sharedApplication] openURL:url]; 1 跟发短信的第2... 阅读全文
posted @ 2016-01-25 14:16 xiaocaoera 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 1 直接跳到发短信界面,但是不能指定短信内容,而且不能自动回到原应用 2 NSURL *url = [NSURL URLWithString:@"sms://10010"]; 3 [[UIApplication sharedApplication] openURL:url]; 1 如果想指定短信内容... 阅读全文
posted @ 2016-01-25 14:12 xiaocaoera 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 最简单最直接的方式:直接跳到拨号界面2 NSURL *url = [NSURL URLWithString:@"tel://10010"];3 [[UIApplication sharedApplication] openURL:url];4 缺点5 电话打完后,不会自动回到原应用,直接停留在通... 阅读全文
posted @ 2016-01-25 14:08 xiaocaoera 阅读(141) 评论(0) 推荐(0) 编辑