我是否正确实施了 TTLauncher?
我正在研究 TTCatalog 示例,只是尝试添加一个带有 appdelegate 中映射的 url 的 url:
[[[TTLauncherItem alloc] initWithTitle:@"Button 1"
image:@"bundle://Icon.png"
URL:@"tt://photoTest1" canDelete:YES] autorelease],
出于某种原因,当您单击它时它根本不执行任何操作。
I was playing around with the TTCatalog example, just tried adding a url with a url mapped in the appdelegate:
[[[TTLauncherItem alloc] initWithTitle:@"Button 1"
image:@"bundle://Icon.png"
URL:@"tt://photoTest1" canDelete:YES] autorelease],
For some reason, it's not doing anything at all when you click on it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您还无法弄清楚这一点,我的猜测是您没有在 launcherView: didselectitem: 中执行任何操作,
只需在方法内创建一个 TTNavigator 对象,然后调用 openURLAction。例如
In case you haven't been able to figure this one out yet, my guess is that you are not doing anything in launcherView: didselectitem:
Just create a TTNavigator object inside the method and then call openURLAction. For example
如果 Robert Lowery 的答案不起作用,请检查您的启动器视图委托。
TTLauncherView.delegate
属性应指向您的视图控制器,并应实现TTLauncherViewDelegate
协议。 (否则launcherView:didSelectItem:
将永远不会被调用。)If Robert Lowery's answer doesn't work, check your launcher view delegate.
The
TTLauncherView.delegate
property should be pointing to your view controller and should implement theTTLauncherViewDelegate
protocol. (OtherwiselauncherView:didSelectItem:
will never get called.)