1

だから私は自分のアプリにこのナビゲーションフレームワークをインストールしようとしています:

https://github.com/weissi/FRLayeredNavigationController

http://www.youtube.com/watch?v=k9bFAYtoenw&feature=plcp

さて、添付の画像を見ると、私のログイン画面があります。ログインが完了したら、「ホーム」ページにセグエ モーダル プッシュを実行します。そこで、ホームページに到達したら FRLayeredNavigationController を開始したいと考えています。ストーリーボードの使用中にそれは可能ですか?Youtube Video によると、通常は次のようにして FRLayeredNavigationController を使用します。

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        // Override point for customization after application launch.

        HomeViewController* homeController = [[HomeViewController alloc] init];
        FRLayeredNavigationController* lnc = [[FRLayeredNavigationController alloc] initWithRootViewController:homeController];

        self.window.rootViewController = lnc;
    }



   [self.layeredNavigationController pushViewController:vc inFrontof:self maximumWidth:NO animated:YES];

ここに画像の説明を入力

4

1 に答える 1

2

セグエを使用してこれを行う方法は見つかりませんでした...しかし、これを達成した方法は次のとおりです。

ログインが成功し、アプリの次の部分に移動したい場合は、次のように移行します。

- (void)loginSucceeded
{
    UIViewController * vc = (UIViewController*)[self.storyboard instantiateViewControllerWithIdentifier:@"someIdentifier"];
    FRLayeredNavigationController * nav = [[FRLayeredNavigationController alloc] initWithRootViewController:vc configuration:^(FRLayeredNavigationItem *item) {
        item.width = 300;
        item.nextItemDistance = 90;
    }];
    [self presentViewController:nav animated:YES completion:nil];
}

ストーリーボード ID を上記の方法で指定したものに設定する必要があります。これは、ストーリーボードを表示し、設計した ViewController を選択すると、[Identity Inspector] タブで見つけることができます。

また、以前に作成したセグエを実行する必要がなくなるので、それを削除します。

画面に「プッシュ」したい将来のView Controllerは、次のように呼び出すだけです。

UIViewController * vc = (UIViewController*)[self.storyboard instantiateViewControllerWithIdentifier:@"SomeStoryboardIDHere"];
[self.layeredNavigationController pushViewController:vc inFrontOf:self maximumWidth:YES animated:NO];
于 2013-11-20T12:44:54.197 に答える