0

I have been trying to use PKRevealcontroller with storyboards but can't seem to find a way to integrate it. All I want is to have a main view controller and a menu on the left.

I can't seem to figure out how and where to add code. If someone has an example that would be great.

I want to try using PKRevealcontroller because it seems to be the only one that passes information from one view controller to another.

Chris
  • 1,416
  • 18
  • 29

1 Answers1

0

You don't have to use PKReveal if all you want to do is pass data between segues. The best and simplest way to do this would be to use the prepareForeSegue method. The method would look something like this:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    FirstViewController *transferViewController = segue.destinationViewController;

    NSLog(@"prepareForSegue: %@", segue.identifier);
    if([segue.identifier isEqualToString:@"joeSegue"])
    {
        //the data you would pass goes here...
    }

}

For a simple explanation, see this tutorial.

If you must use PKReveal, here is a tutorial on how it's done.

CaptJak
  • 3,592
  • 1
  • 29
  • 50
  • yes i know but i want to have the ability of having a sliding menu thats why i want to use PKreveal – Xavier Serrano Jul 20 '13 at 01:22
  • I guess for now it be usefull to know how can i set up the PKreveal class completely with storyboards – Xavier Serrano Jul 20 '13 at 01:51
  • @XavierSerrano If you want to use PKRevealController, I think you will have to download it from GitHub and implement it. not sure how to do this exactly, but it is explained here:http://stackoverflow.com/questions/14885887/ios-integrate-pkrevealcontroller-with-storyboard-auto-layout. You can achieve a similar sliding effect by using a push segue, not to mention it will be ALOT easier to put in. – CaptJak Jul 20 '13 at 02:19
  • @XavierSerrano. Please makeup your mind as to what you want to do. In your question, you state: "I want to try using PKRevealcontroller because it seems to be the only one that passes information from one view controller to another." And in your comment above, you state: "yes i know but i want to have the ability of having a sliding menu thats why i want to use PKreveal". Which are you going for? – CaptJak Jul 20 '13 at 03:15
  • @XavierSerrano edited my answer to add tutorial for PKReveal. – CaptJak Jul 20 '13 at 03:30
  • thanks! i will check it out. my bad if the question seemed ambiguous. – Xavier Serrano Jul 20 '13 at 03:45