Code Monkey home page Code Monkey logo

lgsidemenucontroller's People

Contributors

brightsider avatar coledunsby avatar friend-lga avatar may-ben-arie avatar sticklyman avatar zmian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lgsidemenucontroller's Issues

.SlideAbove style is not working when used as Left view

.SlideAbove style is not working when used as Left view. When using it as Right view, it's working fine. All the other styles are working fine.

If you can point me in the right direction i'm also willing to offer a fix in a pull request.

Kind regards

Add documentation

The inline documentation in LGSideMenuController.h is incomplete. For example, the properties associated with these getters are undocumented.

- (UIViewController *)rootViewController;
- (UIView *)leftView;
- (UIView *)rightView;

Would you please consider documenting these properties and other members of LGSideMenuController?

rootViewController Shadow is gone after replacing rootViewController

If you replace the rootViewController after initializing the whole thing, the shadow is missing.

At first I initialize the menuController with a navigation controller, and there's a button which replaces the navigationcontroller with an other one, after I've replaced the rootViewController of the LGSideMenuController, the shadow is gone when the left or right side menu is shown.

leftview below navigation bar

Thanks for sharing great library. Its amazing.

But I want like leftview below navigation bar.

Can you help me on this.

Error set another rootViewController "setRootViewController"

Hello.

I'm trying to change the rootViewController after touch some index in my MenuClassViewController, example:

if (indexPath.row == 2) {

NewViewController * newView = [[NewViewController alloc]init];
UINavigationController * nav = [[UINavigationController alloc]initWithRootViewController:newView];
[kMainViewController setRootViewController:newView];
}

This step it's ok, but if I try open the Menu again my application stop with this error:

Thread 1: EXC_BAD_ACCESS(code=1, address=0x10)

And showed some problem in this Method:

  • (void)colorsInvalidate
    {...}

screen shot 2015-07-26 at 11 40 10 pm

Do you have any idea about that?

Thank you.

Collaborators WANTED

Guys, sorry, but now I totally don't have enough time to support my repositories. If somebody want to participate I will glad to add him.

And one more thing. If you really want to collaborate, prove your interesting in this library. Star it, fork it, make some issues, pull request. Show me that you understand how it works inside. Or if you do not create any pull request, but really want to improve this library, show me some your ios code and let me see your level.

Issue after Integrating after login screen application

I integrated LGSideMenuController Removed MainViewControler added MYDashboardViewController which is added in another storyboard. two storyboard [from login] then loading LGsideMenu [DashboardViewController], every things is working perfect expect two things.

  1. left menu do have three options (Setting, notification and profile)
    When click setting how to make that as my Mainviewcontroller? Do not want to navigate to another viewcontroller.

  2. My Dashboardviewcontorller (i.e MainViewController) viewdidload is calling three times.

Swift example?

Anyone have a example of how to get this working in swift for a Newbie?

Changing Content Glitches Status Bar

I have a tableview as my left menu. When I select a row I then switch the content of the LGSideMenuController to my new view controller and dismiss the Side menu. However, when I do that the new content loads without a status bar, then after a second loads the status bar and looks somewhat like a glitch. Any recommendations on this issue?

I currently have View Controller Based Status Bar to YES, and have tried using

override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation { return .Fade }

in almost every view controller (including the menu view controller, the content view controllers, etc.) but still experiencing this issue.

How to switch content view controller

In the Demo's you push the selected view controller from side menus. Is there a method like [self.sideMenuViewController setContentViewController:viewController animated:YES]; or should I switch it on my own? (the code is from RESideMenu)

LGSideMenuPresentationStyleSlide Above

I have a issues with LGSideMenuPresentationStyleSlideAbove.
I can use other styles but not this. After click menu button, my main view is dimmed, but i don't see left menu.

Sorry for my bad english, can you help me?

How to disable

How to hide this view In certain ViewControllers that are embedded under the same navigation controller?

addTarget not working

Hi,

My LeftViewController is a UIViewController with UIButtons.
In code, I call addTarget(...) [in Swift] for a button in LeftView, but it's not working :(

I tried with @IBOutlet, but nothing happens.

Tableview not visible anymore after setting background image

Hi,

After setting the backgroundimage the tableview isn't visible anymore.. If I remove the backgroundimage I can see it, but when I set the backgroundimage I only see the image..

I've tried adding it after adding the tableview as a subview, before etc etc. nothing...

Any idea what that can be?

(it's in Swift)

var rootvc = self.storyboard?.instantiateViewControllerWithIdentifier("ViewController") as! ViewController;
rightMenu = self.storyboard?.instantiateViewControllerWithIdentifier("RightViewController") as! RightViewController;

    self.setRootViewController(rootvc);
    self.rightViewBackgroundImage = UIImage(named: "ocean");

    self.setRightViewEnabledWithWidth(100.0, presentationStyle: LGSideMenuPresentationStyleScaleFromBig, alwaysVisibleOptions: LGSideMenuAlwaysVisibleOnNone);
    //self.rightViewBackgroundImage = UIImage(named: "ocean.jpg");

    rightMenu.tableView.reloadData();
    rightMenu.tableView.backgroundColor = UIColor.clearColor();

    var rightView = self.rightView();

    rightView.addSubview(rightMenu.tableView)

    rootvc.main = self;

TableView for LeftView does not load

I am trying to load a tableview as my left view. Instead of showing my custom TableView class, it just shows a blank table and my table never loads. Here is my main view controller:

override func viewDidLoad() {
super.viewDidLoad() 

NSNotificationCenter.defaultCenter().addObserver(self, selector: "toggleMenu", name: "toggleMenu", object: nil)

 leftMenu = self.storyboard?.instantiateViewControllerWithIdentifier("LeftViewController") as! LeftMenuTableViewController

 let navigationController = self.storyboard?.instantiateViewControllerWithIdentifier("NavigationController")

self.setLeftViewEnabledWithWidth(self.view.frame.width * 0.75, presentationStyle: LGSideMenuPresentationStyle.SlideBelow, alwaysVisibleOptions: LGSideMenuAlwaysVisibleOptions.OnNone)

self.rootViewController = navigationController

self.leftView().addSubview(leftMenu.tableView)
}

I've checked out the Demo's and cannot figure out what I am missing.

UIPanGestureRecognizer case UIButton event fail.

The pan gesture recognizer case UIButton can't receive UIControlEventTouchDragExit and UIControlEventTouchDragEnter event actions.

I suggest set the cancelsTouchesInView to NO. panGesture.cancelsTouchesInView = NO;

Status bar animation is not respected on iOS 9.0

Since LGSideMenuController's [self statusBarAppearanceUpdate] does nothing on iOS versions older than 9.0, the status bar is not animated on iOS 9.0. Two steps are needed to solve this:

  1. The user needs to override - preferredStatusBarUpdateAnimation in the side menu's root view controller(s). Here's how to do that in Swift.
override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation {
    return .Slide // or return .Fade
}
  1. LGSideMenuController needs to be updated to perform the following animation when the menu is shown and hidden (as per this Stack Overflow answer).
[UIView animateWithDuration:_leftViewAnimationSpeed animations:^{
    [self setNeedsStatusBarAppearanceUpdate];
}];

Of course, any of the [UIView animateWith... functions could be used instead.
I can get the status bar to animate when the menu appears by putting this animation block in - showLeftViewPrepare, but I have not yet figured out how to animate the status bar when the menu disappears. If I put the animation block in - hideLeftViewDone, then the animation (incorrectly) happens after the menu is fully hidden rather than alongside the menu hiding animation.

Any suggestions?

Disable visible for some period

How I can to disable visible of left/right view for some time period?
Example:

  • when user in guest mode - disabled right view
  • when user on login/register - disable left and right view

How can I push view controller?

Hi,

I have to push a new detail view controller when I tap on a tableview cell. But when I do that, the menu icon is also present on the detail view controller. But I want a back button instead of the menu icon.

Can somebody point me in the right direction?

Thank you!

How can I push view controller with storyboard identifier?

Hi,

I have to push a detail view controller when I tap on a tableview cell using with storyboard identifier. Now i have to navigate to the designed view controller by tap table view cell in the left menu

if (indexPath.row == 0) {
    ProfileViewController *profileVC = (ProfileViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:"ProfileVC"];
    [self.leftMenuVC navigateToViewController:profileVC];
}
- (void)navigateToViewController:(UIViewController *)viewController {
    [(UINavigationController *)[self sideMenuController].rootViewController pushViewController:viewController animated:YES];
    [[self sideMenuController] hideLeftViewAnimated:YES completionHandler:nil];
}

GestureRecognizer

UISlider and UITableview swipe to edit was not working on any of the viewcontroller, I have UIgesturedelegate and following delegate method, what may be the reason am I missing any?

  • (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{

    return YES;
    }

kMainViewController

My view controller where I want to use kMainViewController is not the root controller. My view controller is located in a tabbarcontroller as root controller and then as subview of a navigation controller . How do I have to change the #define below to make it work?

define kMainViewController (MainViewController *)[[(AppDelegate *)[[UIApplication sharedApplication] delegate] window] rootViewController]

Thanks in advance Michael

Gesture recognizer

It is not possible to close menu with swipe gesture from right menu. I guess it is because of this value "CGFloat shiftRight = 44.f;"
I suggest add menuGestureArea property or any other suggestions ?

Thanks in advance

Trouble with right Menu

When I use :

  sideMenuController.leftView().addSubview(menuController.view)

my code works fine but when I use :

   sideMenuController.rightView().addSubview(menuController.view)

my app crash and I get this error :
fatal error: unexpectedly found nil while unwrapping an Optional value

White screen on iOS 8 devices and simulator

Hey, i'm getting a white screen on devices that run iOS8. The rootViewController is set but not presented.

After i'm setting the rootViewController i make my LGSideMenuController subclass a delegate of the rootViewController, this causes the view not the show
Is there any solution for this?

Thanks,

Using a UIViewController with a UITableView instead of UITableViewController

I have got this pod to work with by using UITableViewControllerbut for design purposes I'd like to use a UIViewController with a navigation bar and view for status bar background. I tried duplicating my originally UITableViewController because it worked with my "design idea" and for some reason viewDidLoad isn't even being called anymore and self.tableView = nil even though it is an IBO outlet

Why is that?

Storyboard Example?

This looks like an awesome and more simplified version of other navigation drawer libraries. I was wondering if you could provide an example using storyboards, since thats a pretty common way for setting up view hierarchies these days.
Thanks!

TableView disappear on row touch

I have a static table view and when I touch any row suddenly the table disappears (rows disappear but background image remains)

Here is my code:

@property (strong, nonatomic) MenuTableViewController *menuView;

and initilizing the navigation controller

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
UINavigationController *navigationController = [storyboard instantiateViewControllerWithIdentifier:@"NavigationView"];
LGSideMenuController* sideMenuController = [[LGSideMenuController alloc] initWithRootViewController:navigationController];
[sideMenuController setRightViewEnabledWithWidth:self.view.frame.size.width
                                       presentationStyle:LGSideMenuPresentationStyleSlideAbove
                                    alwaysVisibleOptions:LGSideMenuAlwaysVisibleOnNone];
sideMenuController.rightViewStatusBarStyle = UIStatusBarStyleDefault;

_menuView =  [self.storyboard instantiateViewControllerWithIdentifier:@"TableView"];
[sideMenuController.rightView addSubview:_menuView.tableView];

UIWindow *window = [UIApplication sharedApplication].delegate.window;
window.rootViewController = sideMenuController;

[UIView transitionWithView:window
                          duration:0.3
                           options:UIViewAnimationOptionTransitionCrossDissolve
                        animations:nil
                        completion:nil];

and the table view code ๐Ÿ‘

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.tableView setBackgroundColor:[UIColor clearColor]];
    UIImageView *tableBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img_menu.jpg"]];
    tableBackgroundView.contentMode = UIViewContentModeScaleAspectFill;
    [tableBackgroundView setFrame: self.tableView.frame];
    [self.tableView setBackgroundView:tableBackgroundView];
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}

Also I should say my side menu is full screen.
img_5021
img_5022
img_5023

Another problem is I can't handle touch events of buttons inside the table view. Nether dynamic tables with programmatically handled actions nor referenced IBAction from storyboard.

Menu issue

Hello, I'm using the last version and when I scroll my menu it disappear (the tableview cell became empty). I'm using static tableview and the menu works fine with MMDrawerController.

(before big image) (after scrolling the small image)
untitled

This issue may have relation with this one : #18

Not rotating on iPad2

When menu is opened iPad mini rotating but iPad2 devices not rotating. I check the code and find the line :

Line:1313
if (kLGSideMenuSystemVersion >= 7.0)
{
_savedStatusBarHidden = kLGSideMenuStatusBarHidden;
_savedStatusBarStyle = kLGSideMenuStatusBarStyle;

    [_rootVC removeFromParentViewController];

    _currentShouldAutorotate = NO;
    _currentPreferredStatusBarHidden = (kLGSideMenuStatusBarHidden || !kLGSideMenuIsLeftViewStatusBarVisible);
    _currentPreferredStatusBarStyle = _leftViewStatusBarStyle;
    _currentPreferredStatusBarUpdateAnimation = _leftViewStatusBarUpdateAnimation;

    _waitingForUpdateStatusBar = YES;

    [self statusBarAppearanceUpdate];
    [self setNeedsStatusBarAppearanceUpdate];
}

This is the commit : ea87888

but I don't understand why if iOS7 and above shouldn't rotate?

Thanks.

Starting LGSideViewController directly from storyboard is broken

Steps to reproduce:
On Demo Storyboard application:

  1. Select Main.storyboard as Main interface (from Deployment Info)
  2. Add theese lines below @implementation MainViewController in MainViewController.h
- (void)viewDidLoad {
    [super viewDidLoad];
    UINavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"NavigationController"];
    self.rootViewController = navigationController;


    [self setupWithPresentationStyle:LGSideMenuPresentationStyleSlideAbove type:0];
}

setupWithPresentationStyle:LGSideMenuPresentationStyleSlideBelow also doesn't work.

Can you provide information about how to start a SideViewController directly from storyboard?

Side menu corrupted using a modal view controller.

Hi,
I'm really loving the customization and use of the library, but I have a problem with modal VC.
When I show a modal VC, starting from side menu or even from root (content) menu, the side menu gets corrupted graphic, and worse with every modal.
I'e tried on dispatching on main queue, but no way.
I'm attaching some images.

normal
1st_run
2nd_run

Any idea?

Maintenance

Is this project still going to be maintained or not? I see quite a few PRs and Issues not being handled. /cc @Friend-LGA

replace root viewcontroller breaks the shadow and gesture

I added right view and it works fine with first root view controller
but when I replace it, it breaks shadow and tap gesture
I saw the closed issue which is same and the merge fixed this issue but no luck for me
any help is appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.