IOS8之前 一些过期的方法的处理
2016-06-01 08:44
561 查看
1. drawInRect: withFont:
// [placeholder drawInRect:CGRectMake(8.0f, 8.0f, self.frame.size.width - 16.0f, self.frame.size.height - 16.0f
//
//
// )
// withFont:self.font];
CGContextRef context =
UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context,0.7,0.7,0.7,1.0);
//设置填充颜色 //设置字体
[placeholder
drawInRect:CGRectMake(8.0f,
8.0f, self.frame.size.width -
16.0f, self.frame.size.height -
16.0f
) withAttributes:@{NSFontAttributeName:self.font}];
2.
NSError *audioError;
AVAudioSession *avSession = [AVAudioSession
sharedInstance];
[avSession setCategory:AVAudioSessionCategoryPlayback
error:&audioError];
Float32 bufferLength =
0.1;
[avSession setPreferredIOBufferDuration:bufferLength
error:&audioError];
[avSession setActive:YES
error:&audioError];
// [placeholder drawInRect:CGRectMake(8.0f, 8.0f, self.frame.size.width - 16.0f, self.frame.size.height - 16.0f
//
//
// )
// withFont:self.font];
CGContextRef context =
UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context,0.7,0.7,0.7,1.0);
//设置填充颜色 //设置字体
[placeholder
drawInRect:CGRectMake(8.0f,
8.0f, self.frame.size.width -
16.0f, self.frame.size.height -
16.0f
) withAttributes:@{NSFontAttributeName:self.font}];
2.
NSError *audioError;
AVAudioSession *avSession = [AVAudioSession
sharedInstance];
[avSession setCategory:AVAudioSessionCategoryPlayback
error:&audioError];
Float32 bufferLength =
0.1;
[avSession setPreferredIOBufferDuration:bufferLength
error:&audioError];
[avSession setActive:YES
error:&audioError];
相关文章推荐
- [iOS]Core Data浅析(二)
- iOS开发 GET、POST请求方法:NSURLSession篇
- iOS开发——从一道题看Delegate
- iOS开发 GET、POST请求方法:NSURLConnection篇
- iOS快速开发框架Bee-Framework应用和解析(三) - Message, Model, Signal
- 专访iOS开发框架BeeFramework作者郭虹宇
- iOS快速开发框架--Bee Framework
- iOS开发之runloop
- iOS开源库源码解析之Mantle
- KVC KVO delegate block NSNotification 的应用场景 以及各种坑
- iOS 中KVC、KVO、NSNotification、delegate 总结及区别
- iOS RunTime机制----让catagory能够增加属性
- 漫谈iOS程序的证书和签名机制
- iOS开发-你真的会用SDWebImage?
- iOS定位和位置信息获取
- iOS颜色转图片
- ios 字符串转16进制
- ios 字符串中部分字符串加下划线
- iOS XML转字典
- iOS MD5加密代码