简体   繁体   English

如何使用inputView属性?

[英]how to use inputView property?

I have created my own keyboard and I want to open that in place of standard keyboard provided by the iPhone in the uitextview to enter text.In the Apple documentation I have found one property inputView in the UIResponder Class Reference. 我已经创建了自己的键盘,我想打开,在地方通过iPhone在提供标准键盘uitextview进入text.In苹果的文档,我发现一个属性inputView在UIResponder类参考。 It is given on this link :- here But I m not getting how to use this property.please tell me how to use this property prorpely. 它在此链接上给出:- 在这里,但我没有得到如何使用此属性。请告诉我如何正确使用此属性。 I have tried to use this proerty like this 我已经尝试过使用这种属性

UIView *mainView;

@property (readwrite,retain) IBOutlet UIView *mainView;

- (UIView *)inputView {

    return mainView;
}

That's a property. 那是财产。 You don't have to override its implementation. 您不必重写其实现。 Just use it as any other regular property and affect to it your custom input view. 只需将其用作任何其他常规属性,并对其影响自定义输入视图。

yourTextField.inputView = yourCustomInputView;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM