0
가능한 중복 :
UITextview with zooming?iPhone의 텍스트보기에서 확대하고 축소하는 방법은 무엇입니까?
은 어떤 줌이되고 나는 텍스트를 확대 할 텍스트보기를 누릅니다 UITextview.if에서 옵션을 확대합니다.
도와주세요!
감사합니다.
가능한 중복 :
UITextview with zooming?iPhone의 텍스트보기에서 확대하고 축소하는 방법은 무엇입니까?
은 어떤 줌이되고 나는 텍스트를 확대 할 텍스트보기를 누릅니다 UITextview.if에서 옵션을 확대합니다.
도와주세요!
감사합니다.
확대/축소 UITextView에서 UITextView 대리인의 글꼴 크기를 늘릴 수있는 경우에는 아무런 의미가 없습니다.
UITextView *textView = [UITextView alloc] initWithFrame:CGRectMake(0, 0, 320, 200)];
UIPinchGestureRecognizer *gestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(changeFontSize:)];
[textView addGestureRecognizer:gestureRecognizer];
- (void)changeFontSize:(UIPinchGestureRecognizer *)gestureRecognizer {
UITextView *textView = (UITextView *)gestureRecognizer.view;
float yourFontSize = gestureRecognizer.scale * FONT_SIZE;
textView.font = [UIFont systemFontOfSize:yourFontSize];
}