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

Navigation menu buttons are not showing #221

Open gavinjpotts opened 8 years ago

gavinjpotts commented 8 years ago

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] }];`
Logarythms commented 8 years ago

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.

jlcv commented 8 years ago

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).

gavinjpotts commented 8 years ago

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

jlcv commented 8 years ago

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

crspybits commented 7 years ago

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?

gavinjpotts commented 7 years ago

@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.

crspybits commented 7 years ago

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 commented 7 years ago

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