JCGridMenu icon indicating copy to clipboard operation
JCGridMenu copied to clipboard

JCGridMenu over an UITableView

Open Stan92 opened this issue 11 years ago • 5 comments

Hello, It's not an issue :-) How can I configure c with an UITableView? Thanks for your help.

Stan92 avatar Mar 30 '13 09:03 Stan92

If you have a navigation controller , add CJgrid on that subview instead of UITableView -(void)viewDidAppear:(BOOL)animated { smart_menu = [[SmartMenuHomeViewController alloc] init]; [self.navigationController.view addSubview:smart_menu.view]; [smart_menu open]; }

  • (void)viewDidDisappear:(BOOL)animated { [smart_menu close]; }

tuandao avatar Apr 10 '13 11:04 tuandao

Ooops. Just seen this now, hadn't received an e-mail from Github.

@tuandao is correct, you add the menu after you have added the tableview. Should sit nicely :)

joecarney avatar Apr 17 '13 18:04 joecarney

Hi Tuandao, or Joe, I realize this isn't really supported but I tried to take JCGridMenu for a spin today with one of my projects, and my tableview appears to be frozen from taps, but not scrolling.. I've got a tabbar and navagation controller built as such in my app delegate (using a Storyboard):

UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; UINavigationController *wishlistTVCnav = [[tabBarController viewControllers] objectAtIndex:0]; etc., etc. for each tabBar..

Nothing is yet revealing itself as an obvious issue other than it... I'm pushing ahead with a number of combinations to find out what's up....

Joe, this is a great looking control and I hope I can get it working :) Thanks!

cjazz avatar Jul 10 '13 02:07 cjazz

I take it your project works without the control?

Can you post me the actual code so I can see if there is anything obvious?

I use a transparent view (found in UIView+JCUI) which allows tap throughs onto anything behind it. I've had this control working on a tableview so it should be OK.

joecarney avatar Jul 10 '13 07:07 joecarney

Hello everyone, Joe gave me a hand this morning, and essentially we got my issue resolved. My solution is using a Storyboard, TableViewController, and tabbar (via navigationController). Here are some simple steps to accomplish this:

  1. Make sure you have everything for JCGridMenu installed properly

  2. In your ViewWillAppear instantiate JCGridMenu like so:

    YourTableViewController *myViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"yourStoryboardIdentifer"];

    [self initJCGridMenuWithView:myViewController.view];

At the end of this method: initJCGridMenuWithView, include code like the following:

[yourGridMenu setDelegate:self];
[self.navigationController.view addSubview:yourGridMenu.view];
[yourGridMenu open];

Also on your storyboard enter in the storyboard id - in this example it's "yourStoryboardIdentifer"

I didn't see the need to open another issue because this was related to Stan92's.

Hope you like this Joe's control as much as I do :).

Thanks!

cjazz avatar Jul 10 '13 20:07 cjazz