iDevelopper / PBRevealViewController

A UIViewController subclass for revealing a left and/or right view controller above or below a main view controller.
MIT License
80 stars 16 forks source link

Nothing happens when clicked on side menu button #46

Closed umairqureshi6 closed 6 years ago

umairqureshi6 commented 6 years ago

i have implemented side menu using Objective C version nothing happens when i click on side menu button

i have implemented using example from github

iDevelopper commented 6 years ago

Can you elaborate please? Do you use Storyboard? Is you side menu button well connected to IBOutlet? Can you provide some lines of code?

umairqureshi6 commented 6 years ago

yes i am using a storyboard, side menu button is well connected to IBOutlet have placed this code in UIViewController class

`- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { [coordinator animateAlongsideTransition:^(id context) { } completion:^(id context) {

 }];

[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];

}`

using this code in viewdidload

` _leftButton.target = self.revealViewController; _leftButton.action = @selector(revealLeftView);

_rightButton.target = self.revealViewController;
_rightButton.action = @selector(revealRightView);

// self.revealViewController.leftPresentViewHierarchically = YES; // self.revealViewController.rightPresentViewHierarchically = YES;

//self.revealViewController.leftToggleAnimationDuration = 0.8;
self.revealViewController.toggleAnimationType = PBRevealToggleAnimationTypeSpring;`
iDevelopper commented 6 years ago

I don't see anything wrong here. Can you provide a project example?

iDevelopper commented 6 years ago

Is the class of your MainViewController is set in the storyboard?

umairqureshi6 commented 6 years ago

(https://www.dropbox.com/s/w8nblbycbl3u88k/Daleelo.zip?dl=0)

iDevelopper commented 6 years ago

This link is broken (404).

However, here is a startup sample:

PBRevealSampleObjc.zip

umairqureshi6 commented 6 years ago

you can check that link now!

iDevelopper commented 6 years ago

The segue from PBRevealViewController to MenuTableViewController (identifier: pb_left) in your storyboard must be a subclass of PBRevealViewControllerSegueSetController (not PBRevealViewControllerSeguePushController).