iOS
文章平均质量分 70
吊炸天-狂人
这个作者很懒,什么都没留下…
展开
-
iOS疯狂详解之NSURLSession使用
//// ViewController.m// NSURLSession//// Created by long on 15/9/11.// Copyright (c) 2015年 WLong. All rights reserved.//#import "ViewController.h"@interface ViewController ()@property(n原创 2015-12-03 01:26:38 · 1010 阅读 · 0 评论 -
iOS疯狂详解之warning:performSelector may cause a leak because its selector is unknown
主要是警告信息,在非ARC项目中没有这个警告。如果是在某一处修改只需要加入下列代码:#pragma clang diagnostic push#pragma clang diagnostic ignored "-Warc-performSelector-leaks" [self.ticketTarget performSelector: self.ticketAction w原创 2014-12-15 14:24:57 · 1474 阅读 · 0 评论 -
iOS疯狂详解之AFNetworking图片缓存问题
AFNetworking网络库已经提供了很好的图片缓存机制,效率是比较高的,但是我发现没有直接提供清除缓存的功能,可项目通常都需要添加清除功能的功能,因此,在这里我以UIImageView+AFNetworking类中添加了下面一个清除功能方法:+ (void)clearCache; + (void)clearCache { AFImageC原创 2014-12-12 15:34:14 · 1627 阅读 · 0 评论 -
iOS疯狂详解之启动分层引导动画
一. 为什么要写这篇文章?这是一个很古老的话题,从两年前新浪微博开始使用多层动画制作iOS App的启动引导页让人眼前一亮(当然,微博是不是历史第一个这个问题值得商榷)之后,各种类型的引导页层出不穷,到如今,github上也有了各种的成型的library存在供选择,同时不少app也已经慢慢的开始返璞归真回归单一静态引导页。虽然时尚的潮流不停的在变化,但是我一直在思索,这种多图层的启动引导动画到转载 2014-12-12 10:15:11 · 1125 阅读 · 0 评论 -
iOS疯狂详解之ASIHTTPRequest
ASIHTTPRequest是一款极其强劲的HTTP访问开源项目。让简单的API完成复杂的功能,如:异步请求,队列请求,GZIP压缩,缓存,断点续传,进度跟踪,上传文件,HTTP认证在新的版本中,还加入了Objective-C闭包Block的支持,让我们的代码更加轻简灵活。下面就举例说明它的API用法。发起一个同步请求同步意为着线程阻塞,在主线程中使用此方法会使应用Hang原创 2014-08-26 15:41:09 · 654 阅读 · 0 评论 -
iOS疯狂详解之IOS7状态栏StatusBar官方标准适配方法
IOS7状态栏StatusBar官方标准适配方法hello,大家好,ios7正式版已经发布,相信大家都在以各种方式来适配ios7.如果你已经下载了xcode5,正准备使用,你会发现各种布局的改变.注定这段时间是忙的,是头疼的!这两天经常会碰到群里有人在问问题,问ios7怎么适配,以及各种网上说的如何解决ios7下状态栏的问题.我发现各种群里流传着一种适配方法,就是修改windo原创 2014-08-29 16:38:05 · 1119 阅读 · 0 评论 -
iOS开发 iOS8 适配
简介先来看一下我们的新伙伴:Size Classes。在 iOS8 中,我们不用再像以前那样,一个页面新建多个 xib 文件来适配不同类型的屏幕,现在我们可以把各种尺寸屏幕的适配工作放在一个文件中完成,然后可以通过不同类别的 Size 来定制各种尺寸的界面。换句话说,你眼前的 Storyboard 不是一个普通的 Storyboard ,而是一个九合一的 Storyboard ,可以管理九种类原创 2014-09-23 15:36:11 · 1005 阅读 · 1 评论 -
iOS疯狂详解之TableView以及TableViewCell背景设置
TableViewCell背景设置-(void)tableView:(UITableView *)tableViewwillDisplayCell:(UITableViewCell *)cellforRowAtIndexPath:(NSIndexPath *)indexPath{ cell.backgroundView = [[UIImageViewalloc]initWithI原创 2014-12-10 15:24:38 · 652 阅读 · 0 评论 -
iOS疯狂详解之将摄像头捕获的视频数据转为jpeg格式
想要将摄像头进行视频录制或者拍照可以用UIImagePickerController,不过UIImagePickerController会弹出一个自己的界面,可是有时候我们不想要弹出的这个界面,那么就可以用另一种方法来获取摄像头得到的数据了。首先需要引入一个包#import ,接下来你的类需要实现AVCaptureVideoDataOutputSampleBufferDelegate这个协议,原创 2014-12-10 15:41:58 · 1190 阅读 · 0 评论 -
iOS疯狂详解之设备前后摄像头切换
#import // Switching between front and back cameras - (AVCaptureDevice *)cameraWithPosition:(AVCaptureDevicePosition)position{ NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMedi原创 2014-12-10 15:46:09 · 3672 阅读 · 0 评论 -
iOS疯狂详解之UIScrollerView滚动方向判断
PushListView.h@interface PushListView : UIViewUITableViewDelegate,UITableViewDataSource{ CGFloat contentOffsetY; CGFloat oldContentOffsetY; CGFloat newContentOffsetY;}....原创 2014-12-10 15:48:39 · 1154 阅读 · 0 评论 -
iOS疯狂详解之Svn基本命令
svn命令行使用说明====================0、查看帮助命令: svn help1、同步(checkout)服务器数据到本地命令: svn checkout [directory] svn co [directory]例:把 https://svn.test.cn/book/network/原创 2014-12-10 15:51:48 · 644 阅读 · 0 评论 -
iOS疯狂详解之ASIHttpRequest的简单封装
iOS疯狂详解之ASIHttpRequest的简单封装原创 2014-12-16 17:19:40 · 1297 阅读 · 0 评论 -
iOS疯狂详解之视频播放MPMoviePlayerViewController
需要导入的框架#import MediaPlayer.frameworkMPMoviePlayerViewController:打开网络视频:-(void)openmovie{ MPMoviePlayerViewController *movie = [[MPMoviePlayerViewControlleralloc]原创 2014-12-26 17:32:25 · 1318 阅读 · 0 评论 -
iOS疯狂详解之iOS9 HTTP 不能正常使用的解决办法
在Info.plist中添加NSAppTransportSecurity类型Dictionary。 在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES原创 2015-09-24 13:55:06 · 901 阅读 · 0 评论 -
iOS疯狂详解之GCD卖火车票
@interface ViewController (){ int _totalCount; // 火车票总票数 int _surplusCoynt; // 剩余票数 NSLock *_lock; // 互斥锁}@end// 设置剩余票数 _surplusCoynt = 100; _lock = [[NSLock alloc] ini原创 2015-09-22 13:52:06 · 1606 阅读 · 3 评论 -
iOS疯狂详解之SQlite数据库增删改查
//// SqLiteManager.h// MySqlite//// Created by long on 15/9/15.// Copyright (c) 2015年 WLong. All rights reserved.//#import #import "LanOuStudent.h"#import @interface SqLiteManager : NSO原创 2015-09-16 03:35:28 · 5757 阅读 · 1 评论 -
iOS疯狂详解之NSFileManager使用
NSFileManager 是一个对文件进行操作的类可以创建文件夹,移动文件夹,复制文件夹等.// 创建文件- (void)createFile{ // 获取Documents文件路径#define kDocumentsPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMas原创 2015-09-15 13:26:03 · 2882 阅读 · 0 评论 -
iOS疯狂详解之NSFileHandle
// 创建一个文件- (void)addField{ NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; NSString *fieldPath = [documentPath string原创 2015-12-18 10:56:48 · 1772 阅读 · 0 评论 -
iOS疯狂详解之复杂对象归档反归档
需求:对复杂对象进行归档 反归档复杂对象:工程中 自定义的数据模型类 例如一个Person类Person.h//// Person.h// MySandBox//// Created by long on 15/9/15.// Copyright (c) 2015年 WLong. All rights reserved.//#import @inter原创 2015-09-15 13:20:56 · 1500 阅读 · 0 评论 -
iOS疯狂详解之排序(选择排序/插入排序)
选择排序 1.先求最小值 2.找到位置 3.把位置的数放到有序区 4.重复 for (int j = 0; j < count - 1; j++) { int minIndex = j;// 最小值的角标 for (int i = minIndex + 1; i < count;原创 2015-05-01 18:46:46 · 1956 阅读 · 0 评论 -
iOS疯狂详解之 登陆后淡入淡出更换rootViewController
- (void)restoreRootViewController:(UIViewController *)rootViewController{ typedef void (^Animation)(void); UIWindow* window = self.window; rootViewController.modalTransitionStyl原创 2015-04-09 14:28:29 · 3459 阅读 · 0 评论 -
iOS疯狂详解之开源库
youtube下载神器:https://github.com/rg3/youtube-dlvim插件:https://github.com/Valloric/YouCompleteMevim插件配置:https://github.com/spf13/spf13-vim----------------Mac完整项目----------电台:https://github.com原创 2015-01-28 17:00:26 · 5066 阅读 · 0 评论 -
iOS疯狂详解之tableview编辑添加删除
//// VkoWLAccountVC.m// PocketUniversity//// Created by long on 15-1-14.// Copyright (c) 2015年 WLong. All rights reserved.//#import "VkoWLAccountVC.h"#import "VkoWLMoreTableViewC原创 2015-01-15 14:08:57 · 2707 阅读 · 0 评论 -
iOS疯狂详解之录制音频转换成Mp3
使用第三方 lame ,Mp3音频编码器. 使用 AVAudioRecorder 进行音频录制之前,进行参数设置:NSString *recordTemporaryPathString = [NSString stringWithFormat:@"%@/temporary",self.audioTemporarySavePath];//LinearPCM 是iOS的一种原创 2015-01-05 11:09:15 · 3213 阅读 · 0 评论 -
iOS疯狂详解之UITableView的全选和多选功能
多选做法如下:- (void)tableView:(UITableView *)tableViewdidSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableViewdeselectRowAtIndexPath:indexPath animated:YES]; Custom *cell= (Custom*原创 2014-12-10 16:04:53 · 2216 阅读 · 0 评论