2015年9月13日

保存图片至相册

摘要: //创建图形上下文 UIGraphicsBeginImageContext(CGSizeMake(200, 200)); CGContextRef context = UIGraphicsGetCurrentContext(); UIImage *image = [UIIm... 阅读全文

posted @ 2015-09-13 20:20 Baymax01 阅读(347) 评论(0) 推荐(0) 编辑

创建pdf

摘要: //创建pdf图形上下文 NSString *path = [NSHomeDirectory() stringByAppendingString:@"/Documents/pdf.pdf"]; NSLog(@"%@",path); UIGraphicsBeginPDFContex... 阅读全文

posted @ 2015-09-13 20:19 Baymax01 阅读(155) 评论(0) 推荐(0) 编辑

IOS绘图

摘要: #import "MyView.h"@implementation MyView- (void)drawRect:(CGRect)rect { //获取图形上下文(drawrect方法中已经创建好图形上下文) CGContextRef context = UIGraphicsGetCur... 阅读全文

posted @ 2015-09-13 20:17 Baymax01 阅读(202) 评论(0) 推荐(0) 编辑

IOS断点续传

摘要: #import "ViewController.h"@interface ViewController (){ NSURL *_url; NSURLConnection *_connection; //文件读写 NSFileHandle *_fileHandle; //... 阅读全文

posted @ 2015-09-13 20:14 Baymax01 阅读(156) 评论(0) 推荐(0) 编辑

IOS程序之间的跳转

摘要: 1.首先在Info->URL Types 的 URL Schemes下写入本应用程序名,如:ProjectOne2.跳转到该程序(并传递参数)[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[@"ProjectOne://... 阅读全文

posted @ 2015-09-13 20:12 Baymax01 阅读(150) 评论(0) 推荐(0) 编辑

MBProgressHUD的使用

摘要: 1.创建MBProgressHUD *_hud;2.显示//显示进度条-(void)createProgressView{ _numProgress = 0; _hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]... 阅读全文

posted @ 2015-09-13 19:39 Baymax01 阅读(131) 评论(0) 推荐(0) 编辑

清除缓存的方法(计算)

摘要: 1.计算- (float)checkTmpSize{ float totalSize = 0; NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:diskCac... 阅读全文

posted @ 2015-09-13 19:28 Baymax01 阅读(254) 评论(0) 推荐(0) 编辑

使用post请求下载数据

摘要: //下载数据 -(void)requestData { NSURL *url = [NSURL URLWithString:kVerify]; //转码 //urlStr= [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSMutableURLRequest *reque... 阅读全文

posted @ 2015-09-13 19:17 Baymax01 阅读(385) 评论(0) 推荐(0) 编辑

NSTimer的使用

摘要: 1.创建NSTimer *_timer;2.使用_timer = [NSTimer scheduledTimerWithTimeInterval:0.5f target:self selector:@selector(nextTime) userInfo:nil repeats:YES]; [[NS... 阅读全文

posted @ 2015-09-13 19:15 Baymax01 阅读(114) 评论(0) 推荐(0) 编辑

定位功能(使用系统地图)

摘要: 1.导入MapKit,CoreLocation库 2.viewController文件 阅读全文

posted @ 2015-09-13 19:04 Baymax01 阅读(255) 评论(0) 推荐(0) 编辑

导航