UINavigationController 与 TTNavigator
我在 appdelegate 中使用 UINavigationController 作为所有视图的基础,并使用 TTNavgitor 来实现从 TTTableViewController 开始的另一个流程。
当我出于某种原因使用 TTNavigator 时,我遇到 2 个问题:
- 在我选择其中一行后,加载的视图控制器中没有后退按钮
- 在选择表中的一行时,过渡没有动画效果
我正在使用 Three20 示例的基础:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
self.title = @"Settings";
self.navigationItem.backBarButtonItem =
[[[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStyleBordered
target:nil action:nil] autorelease];
self.tableViewStyle = UITableViewStyleGrouped;
TTNavigator* navigator = [TTNavigator navigator];
navigator.supportsShakeToReload = YES;
navigator.persistenceMode = TTNavigatorPersistenceModeNone;
navigator.window = self.view.window;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://login" toViewController:[LoginController class]];
}
return self;
}
有人知道为什么我会遇到这些问题吗?如何在不重写所有代码的情况下快速解决这个问题?
I am using a UINavigationController in the appdelegate as a basis for all views and I am using the TTNavgitor for antother flow starting with a TTTableViewController.
When I use the TTNavigator for some reason I have 2 problems:
- After I choose one of the rows there is no back button in the viewcontroller loaded
- The transition is not animated when selecting a row in the table
I am using the basis of the Three20 examples:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
self.title = @"Settings";
self.navigationItem.backBarButtonItem =
[[[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStyleBordered
target:nil action:nil] autorelease];
self.tableViewStyle = UITableViewStyleGrouped;
TTNavigator* navigator = [TTNavigator navigator];
navigator.supportsShakeToReload = YES;
navigator.persistenceMode = TTNavigatorPersistenceModeNone;
navigator.window = self.view.window;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://login" toViewController:[LoginController class]];
}
return self;
}
Does some has an idea why do I have these problems? and how can I solve this fast without rewriting all of the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论