IOS8之前 一些过期的方法的处理

来源:互联网 发布:知乎图片保存不了 编辑:程序博客网 时间:2024/06/14 15:25

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 = [AVAudioSessionsharedInstance];

    

    [avSession setCategory:AVAudioSessionCategoryPlaybackerror:&audioError];

    Float32 bufferLength = 0.1;

    [avSession setPreferredIOBufferDuration:bufferLengtherror:&audioError];

    [avSession setActive:YESerror:&audioError];



0 0