开发者

text field need to long press to get touch down action

开发者 https://www.devze.com 2023-02-06 04:32 出处:网络
initially i crate 2 textfields in main view. And i write IBAction to them and give touch down in interface builder.

initially i crate 2 textfields in main view.

And i write IBAction to them and give touch down in interface builder.

But unfortunately开发者_如何学JAVA i need to place scroll view in view and place these two text fields on scrollview.

in the IBAction i am calling action sheet. before adding scroll view it works fine but after adding scroll view need to long press other wise keypad will raise instead of Action sheet

what the wrong can any one pls help me.

Thank u in advance.


Is it possible to forward the touch the the scroll view? Not sure if it is but just an idea?


Hey try this UITextFieldDelegate method This will not raise the keypad

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
  return NO;
}

Do let me know if ths works

0

精彩评论

暂无评论...
验证码 换一张
取 消