Typing while animation UITextView

前端 未结 1 645
抹茶落季
抹茶落季 2021-01-03 12:08

I\'m trying to have a variable-height UITextView which changes size to accomodate its contents, but when the frame changes in the size-change animation, one or two keystroke

相关标签:
1条回答
  • 2021-01-03 12:36

    By default UIView animations disable user interaction for animated view, so possibly (sorry cannot test it now) explicitly enabling user interaction will solve your problem:

    [UIView animateWithDuration:0.1 
            delay:0.0
            options: UIViewAnimationOptionAllowUserInteraction
            animations:^{    
                [textView setFrame:CGRectMake(...)];
            }    
            completion:^(void){}];
    
    0 讨论(0)
提交回复
热议问题