【问题标题】:Implementing tooltip on the right bar button of UINavigationController在 UINavigationController 的右栏按钮上实现工具提示
【发布时间】:2017-10-09 06:28:30
【问题描述】:

我需要在导航控制器的右栏按钮项上实现一个工具提示,上面写着'看看你周围的旅行者',它应该始终在指向该右栏按钮的 UI 上可见。

我在项目中用于工具提示的 pod 是 CMPopTipView。到处休息,它工作正常,但在这个右栏按钮项目的情况下它不能正常工作。请在这里提出正确的建议。

【问题讨论】:

  • 哪个右栏按钮项?到处休息意味着在哪里?
  • 添加一些尝试过的代码或图像以显示它在哪里工作而不是在哪里工作。
  • 我没有收到您的问题。工具提示在UIBarButtonItem 点击事件上是否可见?

标签: ios objective-c uinavigationcontroller tooltip ios11


【解决方案1】:

将下面的代码放入viewDidAppear

CMPopTipView *navBarLeftButtonPopTipView = [[CMPopTipView alloc] initWithMessage:@"A Message"];
navBarLeftButtonPopTipView.delegate = self;
[navBarLeftButtonPopTipView presentPointingAtBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];

参考:CMPopTipView

【讨论】:

    猜你喜欢
    • 2011-07-15
    • 2012-07-30
    • 2014-10-09
    • 1970-01-01
    • 1970-01-01
    • 2013-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多