Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.89 KB

HTStoryBoardID.md

File metadata and controls

46 lines (27 loc) · 1.89 KB

SKSlideViewController

SKSlideViewController is an easy to use, slide-to-navigate view controller for ios 6.0 +. It enables you to present a main view controller and an optional, direction-sensitive accessory view controller. It is easy to setup and modify.

###How To (Using Storyboard IDs)

  1. Create A New Project (Sample)

    Alt text

  2. Import SKSlideViewController to the project

    Alt text

    Alt text

  3. In the storyboard add 4 View Controllers. SKSlideViewController,MainViewController, LeftViewController and RightViewController

  4. Set the the custom class of one of the controller to SKSlideViewController.

    Alt text

  5. Add Storyboard ID of the MainViewController, LeftViewController and RightViewController to MainVC, LeftVC and RightVC respectively.

    Alt text

  6. Create a modal segue from InitialViewController(SAViewController) to SKSlideViewController and name it as SlideVC.

    Alt text

  7. In the InitialViewController's implementation file add the following method.

     -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
         if([segue.identifier isEqualToString:@"SlideVC"]){
             SKSlideViewController *slideController=(SKSlideViewController *)[segue destinationViewController];
             [slideController setStoryBoardIDForMainController:@"MainVC" leftController:@"LeftVC" rightController:@"RightVC"];
             [slideController reloadControllers];
         }
     }
    
  8. Test and run the code. You could see MainViewController which can be slided to left and right to reveal LeftViewController and RightViewController.

  9. Next see implementing SKSlideViewDelegate