How to detect keyboard enter key?

前端 未结 4 696
广开言路
广开言路 2021-01-16 13:50

I have on UIWebView in that i am allowing editing at runtime.

Now when i click on UIWebView then iPad keyboard opens for writing, now my re

4条回答
  •  余生分开走
    2021-01-16 14:30

    Use some keyboard notification. i used the following code for detecting the keyboard is going to hide

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(nothing)    name:UIKeyboardWillHideNotification object:nil];
    }
    -(void)nothing
    {
         NSLog(@"do Whatever u want");
    }
    

    try it.,.

提交回复
热议问题