Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tableview not visible anymore after setting background image #9

Closed
kentim opened this issue Aug 26, 2015 · 1 comment
Closed

Tableview not visible anymore after setting background image #9

kentim opened this issue Aug 26, 2015 · 1 comment

Comments

@kentim
Copy link

kentim commented Aug 26, 2015

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;
@Friend-LGA
Copy link
Owner

Check out demo projects, it shows how to use LGSideMenuController with tableViews and backgroundImages.

Your code looks not bad. But this line is a little strange rootvc.main = self; I think you don't need this.
And use this method to set frame for your tableView:

- (void)leftViewWillLayoutSubviewsWithSize:(CGSize)size;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants