aryaxt / iOS-Slide-Menu

iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook
Other
1.53k stars 359 forks source link

Adding a UIBarButtonItem with a customView doesn't work. #3

Closed aryaxt closed 11 years ago

aryaxt commented 11 years ago

If you pass a UIButton wrapped in a UIBarButtonItem as a 'custom view' of the slide menu, clicking the button doesn't work, because the action and target are not set to the button, but they are set to the UIBarButtonItem

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:someButton]; [[SlideMenu sharedInstance].rightBarButtonItem = item;

aryaxt commented 11 years ago

There are endless possibilities with a UIBarButton with a custom view. Not going to add a fix for a single scenario. Do not use a UIBarButton with a custom view as the menu buttons