摘要: 一:iOS文件上传提示URL错误Invalid parameter not satisfying: fileURL'二:解决方法:NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"wallpaper" ofType:@"jpg"];NSURL* imageURL = [NSURL fileURLWithPath:imagePath isDirectory:NO]; 注意:FileUrl 要调用 NSURL的 file 开头的类方法;参考http://stackoverfl 阅读全文
posted @ 2013-12-25 22:06 cocoajin 阅读(2821) 评论(0) 推荐(0)
摘要: 一:AFNetworking的文件上传: 主要几个以下类似- (BOOL)appendPartWithFileURL:(NSURL *)fileURL name:(NSString *)name error:(NSError * __autoreleasing *)error;二:主要代码: //配置文件上传 //图片data 上传 //UIImage *upImage = [UIImage imageNamed:@"testImage.png"]; //NSData ... 阅读全文
posted @ 2013-12-25 22:02 cocoajin 阅读(7348) 评论(0) 推荐(0)
摘要: 一:上传表单 --> Send this file: 二:上传处理文件php 0) { $error = "file upload error"; array_push($result,0,$error,$_FILES); } else { if (file_exists("upload/" . $_FILES["file"]["name"])) { echo json_encode($_FILES["file"]["name"] . " already... 阅读全文
posted @ 2013-12-25 21:08 cocoajin 阅读(2606) 评论(0) 推荐(0)
摘要: 一:iOS6.0及以后:下拉刷新控件UIRefreshControlTableView属性:refreshControl二:使用 1 - (void)colseTheTB 2 { 3 [self dismissViewControllerAnimated:YES completion:nil]; 4 } 5 6 - (void)viewDidLoad 7 { 8 [super viewDidLoad]; 9 10 self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithBarBut... 阅读全文
posted @ 2013-12-25 14:33 cocoajin 阅读(671) 评论(0) 推荐(0)