TTPostController - 键盘未出现

发布于 2024-11-07 01:07:17 字数 781 浏览 0 评论 0原文

你好 我正在添加“在我的 iPhone 应用程序中发表评论部分” 其余的一切都工作正常,但是当我点击“postController textView”时,键盘应该从底部出现,但它没有出现但是光标正在显示,并且我使用 postController.textView.text 传递的文本= @"" 也显示。

请建议修复此错误所需的区域。

   -(void)showCommentView
    {
        TTPostController *postController = [[TTPostController alloc] init];

    // self must implement the  TTPostControllerDelegate protocol
        postController.delegate = self; 
        self.popupViewController = postController;

     // assuming self to be the current UIViewController
        postController.superController = self;
            postController.textView.text=@"temporary text";
        [postController showInView:self.view animated:YES];
        [postController release];
    }

上面是调用 Three20 PostController 的代码

Hi
I am adding a "post comment section in my iPhone APP"
rest all things are working fine but when I tap on "postController textView" a keyboard is suppose to appear from the bottom but it is not appearing However the cursor is displaying and the text that I am passing using postController.textView.text = @"" is also displaying.

Please suggest the areas to be looked for fixing this bug.

   -(void)showCommentView
    {
        TTPostController *postController = [[TTPostController alloc] init];

    // self must implement the  TTPostControllerDelegate protocol
        postController.delegate = self; 
        self.popupViewController = postController;

     // assuming self to be the current UIViewController
        postController.superController = self;
            postController.textView.text=@"temporary text";
        [postController showInView:self.view animated:YES];
        [postController release];
    }

above is the code that is giving call to the Three20 PostController

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深者入戏 2024-11-14 01:07:17

以下是未更改的调用方法...

    -(IBAction)postComment:(id)sender
            {
        [UserManager instance]authenticateUserAndProceed:self withSelector:@selector(showCommentView)];
        }
-(void)showCommentView
    {
        TTPostController *postController = [[TTPostController alloc] init];

    // self must implement the  TTPostControllerDelegate protocol
        postController.delegate = self; 
        self.popupViewController = postController;

     // assuming self to be the current UIViewController
        postController.superController = self;
            postController.textView.text=@"temporary text";
        [postController showInView:self.view animated:YES];
        [postController release];
    }

更改的方法

-(void)authenticateUserAndProceed:(id)parent withSelector:(SEL)selector
{
    theParentViewController = parent;
    self.theFunctionToCall = selector;
    if(userid == nil)
    {
        GetUserInfoViewController *guivc = [[GetUserInfoViewController alloc] init];
        [parent presentModalViewController:guivc  animated:YES];
        guivc.delegate = self;
        [guivc release];
    }


    else {
//////////////////// below line was replaced///////////
//  2.          [theParentViewController performSelector:selector];
// with below code
    UIAlertView *alert =[[UIAlertView alloc]initWith Title........
    [alert show];

        }
    }

问题摘要:
用户一注册,就无法在 kyboard 上查看 TTPostController

变更摘要:
用户注册后,立即拨打
[ParentViewController PerformSelector:选择器];
不是直接发送的,而是调用到 an 警报视图,该警报视图内部调用它。

效果总结:
用户将看到“您已注册成功”(某种)警报视图。
点击“确定”,他将被发送到 TTPostController。 (这次键盘出现了)

我将第 2 行保留在 AlertViewDelegate 方法中。
我很惊讶看到它只需要不直接拨打 2 号线就可以工作。

这对我有用。
我欢迎任何新的更好的想法来实施同样的想法

below is the calling method which is unchanged...

    -(IBAction)postComment:(id)sender
            {
        [UserManager instance]authenticateUserAndProceed:self withSelector:@selector(showCommentView)];
        }
-(void)showCommentView
    {
        TTPostController *postController = [[TTPostController alloc] init];

    // self must implement the  TTPostControllerDelegate protocol
        postController.delegate = self; 
        self.popupViewController = postController;

     // assuming self to be the current UIViewController
        postController.superController = self;
            postController.textView.text=@"temporary text";
        [postController showInView:self.view animated:YES];
        [postController release];
    }

changed method

-(void)authenticateUserAndProceed:(id)parent withSelector:(SEL)selector
{
    theParentViewController = parent;
    self.theFunctionToCall = selector;
    if(userid == nil)
    {
        GetUserInfoViewController *guivc = [[GetUserInfoViewController alloc] init];
        [parent presentModalViewController:guivc  animated:YES];
        guivc.delegate = self;
        [guivc release];
    }


    else {
//////////////////// below line was replaced///////////
//  2.          [theParentViewController performSelector:selector];
// with below code
    UIAlertView *alert =[[UIAlertView alloc]initWith Title........
    [alert show];

        }
    }

PROBLEM SUMMARY:
as soon as the user registered, he was not able to the kyboard for the TTPostController

CHANGE SUMMARY:
As soon as the user is registered the call to
[theParentViewController performSelector:selector];
is not sent directly but the call goes to ann alertview which inter calls it.

EFETCS SUMMARY:
the user will see a "you are registered successfully" (kind of) alertview.
tapping OK on which, he will be sent to TTPostController. (this time the keyboard is appearing)

I kept the line# 2 in the AlertViewDelegate method.
I was amazed o see it working just by not calling the line 2 directly.

this worked for me.
I welcome any new and better idea to implement the same

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文