iOS-Slide-Menu icon indicating copy to clipboard operation
iOS-Slide-Menu copied to clipboard

Navigation menu buttons are not showing

Open gavinjpotts opened this issue 8 years ago • 8 comments

The left/right menu buttons aren't showing up in my installation. I also tried manually adding a button and that doesn't seem to work. I took a look in the Debug View Hierarchy and it's not in the stack at all.

Swipe still works normally to open the left menu, and the title does show up, just no buttons.

My app delegate initialization: ` UIStoryboard* mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; MenuViewController* menu = [mainStoryboard instantiateViewControllerWithIdentifier:@"Menu"];

[SlideNavigationController sharedInstance].leftMenu = menu;
[[SlideNavigationController sharedInstance].navigationBar setTintColor:[UIColor whiteColor]];
[[SlideNavigationController sharedInstance] setEnableSwipeGesture:YES];
[[SlideNavigationController sharedInstance] setAvoidSwitchingToSameClassViewController:YES];
[[SlideNavigationController sharedInstance].navigationBar
    setBarTintColor:[UIColor colorWithRed:0.02 green:0.81 blue:0.72 alpha:1]];
[[SlideNavigationController sharedInstance].navigationBar setTitleTextAttributes:
                                                              @{ NSForegroundColorAttributeName : [UIColor whiteColor] }];`

gavinjpotts avatar Apr 23 '16 18:04 gavinjpotts

I ran into the same issue with my project. The problem seems to be related (at least for me) to the use of Embedded Frameworks with Cocoapods. After reverting from using EFs, everything went back to normal again.

Logarythms avatar May 02 '16 09:05 Logarythms

Same thing happening to me, I can confirm that this issue appeared after using an embedded framework. Any way to fix this without reverting? Will everything be normal if I use the embedded framework without Cocoapods? (Manually inserting the library into the project).

jlcv avatar May 02 '16 21:05 jlcv

Confirmed what @Logarythms mentioned - I couldn't get it to work with Embedded Frameworks, but removing that flag fixed the issue.

gavinjpotts avatar May 02 '16 23:05 gavinjpotts

Solution for this bug is in pull request #208. With this fix you can get the button to appear without removing the flag.

jlcv avatar May 08 '16 21:05 jlcv

I'm getting a similar problem. In my case, even if manually insert the library into the project I still cannot get it to work. The left nav bar button does not display. The side menu does open if I tap or drag, but the nav bar button is not displaying. I have tried adding my own custom button but that too gives the same results. Ideas?

crspybits avatar Aug 18 '17 00:08 crspybits

@crspybits I also noticed if I had manually added elements to the nav bar then the buttons would no longer display. I don't have my code atm to provide an example, but when I removed other custom elements the nav buttons then showed as expected.

gavinjpotts avatar Aug 18 '17 01:08 gavinjpotts

Actually, I have it working now. But, I am having to manually insert the library into the project. My problem, when I had the library inserted manually before, seemed to come from the nav bar tint I had selected (white), which caused the bar button to not show up on a white nav bar. I would still like to use the Cocoapod though...

crspybits avatar Aug 18 '17 01:08 crspybits

I'd rather have this working as an actual Cocoapod. Ideas?

crspybits avatar Aug 18 '17 15:08 crspybits