TTMessageController 无法将其 textEditor 设置为firstResponder
我有一个 TTMessageController 的子类(CommentViewController),并且有以下映射
[map from:@"tt://postDetails/(initWithPostId:)/(anotherId:)" toViewController:[PostDetailsViewController class]];
[map from:@"tt://groupBoardAddComment/(initWithPostId:)/(anotherId:)" toModalViewController:[CommentViewController class]];
当我从 PostDetailsViewController 类调用 CommentViewController 时,它的键盘不会出现,但是当我从其他类调用它时视图控制器类其键盘出现,
即使我尝试在我的 CommentViewController 的所有 viewWillAppear、viewDidLoad 等方法中强制成为FirstResponder 其 textEditor,仍然无法实现 出现。
希望得到答复,确实需要帮助,谢谢
I have a subclass of TTMessageController which is (CommentViewController) and I have the following mapping
[map from:@"tt://postDetails/(initWithPostId:)/(anotherId:)" toViewController:[PostDetailsViewController class]];
[map from:@"tt://groupBoardAddComment/(initWithPostId:)/(anotherId:)" toModalViewController:[CommentViewController class]];
When I call CommentViewController from my PostDetailsViewController class, its keyboard does not appear, but when I call it from my other view controller class its keyboard appears,
even if I try to force to becomeFirstResponder its textEditor in all viewWillAppear, viewDidLoad and etc. methods of my CommentViewController, still I cannot make it appear.
hope for a reply, really need help with this, Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里的问题是,当用户开始在我的文本字段中编辑时,我调用该方法,而不是文本字段,我将其更改为带有选择器的按钮来调用和显示 CommentViewController,
而不是这个,
我创建了一个由按钮调用的方法,如下所示一个选择器
the problem here is, i call the method when user begins edit in my textfield, instead of textfield i change it to a button with a selector to call and display the CommentViewController,
Instead of this
I made a method to be called by a button as a selector