cwRichardKim / RKSwipeBetweenViewControllers

Swipe between ViewControllers like in the Spotify or Twitter app with an interactive Segmented Control in the Navigation Bar
MIT License
1.67k stars 156 forks source link

how does RKSwipeBetweenViewControllers work between UINavigationController #36

Closed litt1e-p closed 7 years ago

litt1e-p commented 9 years ago

it seems RKSwipeBetweenViewControllers can run at appDelegate.m?

ritesh124 commented 7 years ago

Its Simple

@interface RKSwipeBetweenViewControllers ()

- (void)viewDidLoad
{
    [super viewDidLoad];

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

    UIViewController* theController = [storyboard instantiateViewControllerWithIdentifier:@"theControllerOneID"];

    UIViewController* theController2 = [storyboard instantiateViewControllerWithIdentifier:@"theControllerTwoID"];

    UIViewController* theController3 = [storyboard instantiateViewControllerWithIdentifier:@"theControllerThreeID"];

    UIViewController* theController4 = [storyboard instantiateViewControllerWithIdentifier:@"theControllerFourID"];

    //
    viewControllerArray = [[NSMutableArray alloc]init];

    [viewControllerArray addObject:theController];

    [viewControllerArray addObject:theController2];

    [viewControllerArray addObject:theController3];

    [viewControllerArray addObject:theController4];
}