相关疑难解决方法(0)

TabBarController和SplitViewController

我想让我的内容splitviewController显示在一个TabBarController.不幸的是,我首先决定只SplitViewController选择苹果的模板.现在我处于不方便的位置,不知道如何将其添加到标签栏.

我尝试了几个在StackOverflow上解释的东西,但最好的结果是一个黑色的屏幕下面有一个标签栏:-(

我正在努力寻找一种美好而简单的方法.

我的代码Appdelegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{
// Override point for customization after application launch.
// Add the split view controller's view to the window and display.
self.window.rootViewController = self.splitViewController;
[self.window makeKeyAndVisible];

NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
documentFolderPath = [searchPaths objectAtIndex: 0];
self.rootViewController.directoryPath = documentFolderPath; 

NSURL *docUrl = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
if ([docUrl isFileURL]) {
    NSString *path = [docUrl path];
    self.detailViewController.currentFilePath = path;
    [self.detailViewController setDetails:path newFile:FALSE];
}
return YES;
Run Code Online (Sandbox Code Playgroud)

objective-c uitabbarcontroller ipad uisplitviewcontroller ios

7
推荐指数
3
解决办法
9552
查看次数