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];