您的位置:首页 > 移动开发 > IOS开发

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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: