【发布时间】:2013-04-09 14:45:07
【问题描述】:
我尝试从详细视图推送到另一个视图。我在detailView“ConRDPDetailViewController”中有一个tableView,当我单击一行时,我会喜欢它,它会推送新视图“BookmarkEditorController”。 这是我在“ConRDPDetailViewController”中尝试这样做的方法:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ComputerBookmark* bookmark = nil;
if([indexPath section] == SECTION_BOOKMARKS)
{
// first row has either quick connect or add bookmark item
if([indexPath row] == 0)
{
// show add bookmark controller: is there I try to push the new View
BookmarkEditorController* bookmarkEditorController = [[[BookmarkEditorController alloc] initWithBookmark:[[ComputerBookmark alloc] initWithBaseDefaultParameters]] autorelease];
[bookmarkEditorController setTitle:NSLocalizedString(@"Ajouter Connexion", @"Add Connection title")];
UINavigationController *view = [[UINavigationController alloc] initWithRootViewController:bookmarkEditorController];
[view.navigationController pushViewController:bookmarkEditorController animated:YES];
[bookmarkEditorController setDelegate:self];
[bookmarkEditorController setHidesBottomBarWhenPushed:YES];
}
}
}
但是什么也没发生,这是我在 AppDelegate.m 中的方法 didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self redirectConsoleLogToDocumentFolder];
// Initialize the app window
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
AuthentificationViewController *authentificationViewController =[[AuthentificationViewController alloc] initWithNibName:@"AuthentificationView" bundle:nil];
//self.window.rootViewController = self.splitViewController;
self.window.rootViewController = authentificationViewController;
[self.window makeKeyAndVisible];
// The new popover look for split views was added in iOS 5.1.
// This checks if the setting to enable it is available and
// sets it to YES if so.
// if ([self.splitViewController respondsToSelector:@selector(setPresentsWithGesture:)])
// [self.splitViewController setPresentsWithGesture:YES];
return YES;
}
提前谢谢你
【问题讨论】:
-
只是让您知道:这是“身份验证”。不要想成为一个拼写纳粹:)
-
@Erway Software 这是故意完成的,“认证”是法语而不是英语,我知道英语中的“认证”是“认证”。否则,谢谢您的评论,但我怀疑我的问题是否存在。
-
对不起。不知道是法语。
-
如果有人来这里寻找 Swift 和 iOS8 中的解决方案 - swiftwala.com/multiple-detail-views
标签: ios objective-c uinavigationcontroller uisplitviewcontroller