As @eric pointed out, the UIBar
button only displays the menu.
If you want it to dismiss the menu on the same IBAction you will need to add more logic:
- (IBAction)menuButtonTapped:(id)sender {
//Chek the current position
if([self.slidingViewController currentTopViewPosition]==2){
//show menu
[self.slidingViewController anchorTopViewToRightAnimated:YES];
}else{
//Dismiss menu
[self.slidingViewController resetTopViewAnimated:YES];
}
}