ios11버전에서 UITextView 회전 버그 문제

조회수 740회

안녕하세요.

이번에 IOS11버전부터 UITextView 텍스트를 크게 하고 회전을 해버리면 이미지처럼 흰줄이 생겨 버립니다.

혹시 이와 비슷한 경험이 있으신분 있으시면 답변 달아주시면 문제 해결에 많은 도움이 될꺼 같습니다.

ios11이전 버전들은 문제 없이 잘 됩니다 ㅜㅜ

좋은 하루 되시기 바랍니다.

이미지

-(IBAction)actionTest:(id)sender{



    UIView *trueView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 900, 1070)];

    [trueView setBackgroundColor:[UIColor clearColor]];

    trueView.clipsToBounds =YES;





    UITextView *textView  = [[UITextView alloc]init];

    [textView setBackgroundColor:[UIColor yellowColor]];

    textView.text = @"test";



    textView.font = [UIFont systemFontOfSize:250];

    [textView setFrame:CGRectMake(300,300, 800, 600)];

    textView.transform = CGAffineTransformRotate(textView.transform,-0.8);



    [trueView addSubview:textView];



    UIGraphicsBeginImageContextWithOptions(CGSizeMake(900, 1070),NO,1);

    CGContextRef trueContext = UIGraphicsGetCurrentContext();

    CGContextTranslateCTM(trueContext,0, 0);

    [trueView.layer renderInContext:UIGraphicsGetCurrentContext()];

    UIImage *originalImage = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();


    self.iv.image  = originalImage;



}

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)