-
Notifications
You must be signed in to change notification settings - Fork 990
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
Segue to proper tab of tabbar (front view) from rear view. #563
Comments
Hello, Is it what you want? |
Yes, this did it! Thank you very much. |
Hi, I have one more question. When we segue back to the frontcontroller from the menu, is it possible to pop a uiviewcontroller that is currently on the frontcontroller? I have a scenario where something gets pushed on the frontcontroller (in this case, one of the tabs from the tabbar), so when I go back to it from the menu I want that added VC to be popped off. Thanks. |
|
That works, thanks! |
Perhaps, it is better not to animate:
|
@iDevelopper,Thanks for your help,Any help for swift version for SWTabBar 2.zip? Also,one question,how to disable slide menu on some view?Means at some view i want to disable the slide menu and its gesture but,i want to enable back swipe feature. At the SWTabBar 2.zip you shown how to push view controller,but,it disable on gesture swipe for drawer appearance on view.But,not at navigation bar.Try swiping from navigation bar and you will see the menu appear on push segue view. Thanks for your sample project. |
@htarwara6245 , I'm not strong enough in swift if you want to disable a gesture:
|
ok,Thanks,If i got an answer,I will share it here. |
Perhaps this should help : |
But if you know swift it is not very complicated to translate the code as each objective-c method has an equivalent in Swift |
@htarwara6245 , I have not managed to use MyAppConverter. So I followed a tutorial and following a swift version of my example : Tell me what! |
Thanks for the help.Currently.I only have Xcode 9.2 at my mac.But,I will try to reply u back when i got Xcode 7.3.Thanks for giving me some time.:D. |
@iDevelopper ,it really worked!!!I mean the swift version u gave to me...Thanks for the excellent example you supported.Sorry about my late reply.Thank you. |
This is the last version: |
@iDevelopper ,I want to create something more creative.Assume we got table view on each tab bar item. Please check my new project When we navigate from slide menu to other view controller that is not in reveal controller,there is no back button because when we make back segue it could turn to left menu.Please take a look at my project.There might be some crash on navigation on item 1 and 2 slide items. What i want? UITabBarController(Item 1) got UITableViewController -> Tap Classic - >Go to classic view,when back from classic,back to UITabBarController. Same flow on Slide menu Please ask me if u feel complex about that,A little help if u have some time? |
@htarwara6245 , I looked and changed the project but I ask myself the question why you want to do that. Come back on a view where the user did never passed! As you do that can not work. You instantiate the final view controller to push it, so nothing in the stack to return. I modified in MenuTableViewController, in didSelectRowAtIndexPath. Hope I understood! I deleted the add Tap an Pan Gesture in the view controllers. Just need to do that in RevealViewController class. You deleted a part of rightViewController. I did not care. |
Yeah,I asked myself,too.This is ridiculous.Actually this app design is similar to Google + app.But,the client wants to navigate the item inside tab from slide menu which was non-sense. But,I really appreciate that you gave some time to help me out,Thank you.:) Sorry for my late reply I just got home from work. |
@iDevelopper ,I got some question to ask.Its about library. 1.How do i disable the swipe gesture when i was at Classic View?I only want to enable the swipe gesture meant for back swipe.Not the drawer appearance swipe.Centure Pan Gesture. 2.How to make menu not stretch when i swipe it? 3.How to make menu navigation animation disable and do like normal slide menu. 4.How to disable menu bounce? |
@htarwara6245 , |
No.1 I solve the problem like that, But,while I am testing my application I found that black screen appear everytime i swipe the slide menu multiple time between rear view and front view I fixed that bug like that.At the RevealViewController,I added the following code And I want another solution too,hope you can help me, Thanks for all the help u gave me all the way. |
I'll write a sample |
What about this? |
@iDevelopper,I got one final question to ask. Because my app gonna release soon.Is there any way that i can disable font view(Tab Bar) user interaction when the reveal view (Left Menu) appear? Thanks |
I got it now.At my front view,I mean every front view.I extended SWRevealViewControllerDelegate and at viewDidLoad(),added two line of codes
and added two delegate methods,
If there is a better way,Any suggestion is appreciated. And Thanks for all your help you gave me all the way. |
Nah that didnt work....When i implement the above way,this function at SWRevealController stop working ``
`` |
Do like in this sample. Add in RevealViewController subclass the two methods tapGestureRecognizer and panGestureRecognizer in viewDidLoad. Delete the viewWillAppear in each front controller. |
I can't delete viewWillAppear at each front controller because there are some async network call method at viewWillAppear on each Front View Controllers.So,Its there any other way?I have to tell you something that when i tried add this code at My RevealViewController. http://puu.sh/oKMm2/f30c2de909.png When i clicked menu item which was at reveal view controller,it animated a little faster than normal i guess.But,it worked now.no more user interaction on front view controller and i didn't need to remove ViewWillAppear on each Front View Controller. |
And do not set a delegate for sw elsewhere than in RevealViewController subclass! |
My client wants something new again.Assume we got 4 tab bar items at UITabBarController.Assume 4 Main Categories for now.But,he want to add new Home View Screen.When the app load the TabbarController.I want to show HomeViewController.But,I want all 4 tabbaritems to be deselected.Means i want to make home view controller with slide menu as root view controller and want to show tab bar at home view.But,wants to deselect all tabbaritems at home view.Can I make it like that? More Simply. Any Help?I am also trying to figure this out.If you have anytime,can you help me?@iDeveloper |
I don't understand. What is for the HomeViewController? You can't have a TabBarController with no item selected... |
Mind please take a look at Google + app on iOS.And when you open slide menu,choose Profile.You will see No tabBarItem is selected when it showed profile View.My Idea is same like that.But,different is I want to show Profile as RootViewController with no tabbarItem selected.If i choose "Home",it should select home to.You will see what i am talking about when u use that app.Thanks Regards. |
I think they don't use a TabBarController but just a TabBar and at this moment the can do tabBar.selectedItem = nil which is not allowed if the tabBar is managed by a tabBarController |
Can you help me find this out with UITabBarController?because i set the whole project with UITabBarController on storyboard.;( |
You could set a color for unselected items and a tint color for selected item and when you want no item selected, change the tint color to the same color of unselected item.
|
If I can work with UITabBar,would you provide an example of my above requirement with UITabBar with reveal controller which i can push from each tab as well as from slide menu?Please? |
The best way will be to use container views, have a look! |
Here is a sample: |
Thanks for the help,I just tell my client that I have to add new Home Tab instead before your answer come in.Anyway,really thanks for your help all these way even that is not concerned with this library. |
@iDevelopper,I know this one is close,so I would like to post a new question which need your support : Any Help?Its about navigating to each screen inside left menu or tabbaritem. |
I have the following storyboard setup (see attached screenshot).
It's a fairly simple setup, where I have a tabbarcontroller as the frontviewcontroller with two tabs. I want to be able to segue to the proper tab from the rear view (which is the menu table view).
Here is what I'm currently doing:
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView reloadData];
if (indexPath.row == 1 || indexPath.row == 2) {
[self performSegueWithIdentifier:@"toTabBarSegue" sender:indexPath];
}
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"toTabBarSegue"]) {
if ([sender isKindOfClass:[NSIndexPath class]]) {
NSIndexPath *indxPath = (NSIndexPath *)sender;
TabBarViewController *tBVC = segue.destinationViewController;
tBVC.selectedIndex = indxPath.row;
}
}
}
Problem: This segues to the proper tab but the menu gesture stops working. Also the the state of the tab is reloaded to initial settings. So my question is, what is the best way to load a particular tab with previous state from rear view (menu) uitableview?
Any help is much appreciated!
The text was updated successfully, but these errors were encountered: