0

enter image description here

I'm using the ECSlidingViewController in my application that uses a tab controller. to make a long story short, ECSlidingViewController disables the tab bar functionality of popping back to the first initial viewcontroller that was on the screen. I'm assuming this functionality is disabled because the view controllers are liked by Storyboard ID. I really want to know if its possible before I change up my app. I dont know what code any of y'all would like to see, just tell me and I'll post it. thanks!

InitViewController is the initial view that gets loaded when the app starts up, it then makes GroupsImInController the TopViewController and from there i can segue to other viewcontrollers but if were to tap on the tabbar item, it does not take me back to the inital view which in this case would be GroupsImInController

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Fabian Buentello
  • 532
  • 1
  • 4
  • 16

1 Answers1

0

ECSlidingViewController uses its own structure system for managing view controllers. To get back to the top view controller you need to add

#import "ECSlidingViewController.h"

to your header file and then in the method called when your tab button is pressed add:

[self.slidingViewController resetTopView];

That should animate the top view back over your 'under left' or 'under right' view controller as necessary.

JiuJitsuCoder
  • 1,866
  • 14
  • 13
  • I tried `[self.slidingViewController resetTopView];` and it didnt work. on one of the viewcontrollers that I could segue to from topviewcontroller I placed a button that only did `[self.slidingViewController resetTopView]` and it still didnt work. do you know what could cause that? – Fabian Buentello Aug 08 '13 at 21:12
  • You have to embrace the entire ECSlidingViewController system. You probably don't have it setup right. You have to add your view controllers to self.slidingViewController.underLeftViewController, self.slidingViewController.underRightViewController and self.slidingViewController.topViewController to make it work right. You then use the anchorTopViewOffScreenTo:(ECSlide)side; method to slide the views programatically. You use the method mentioned in my answer to reset the top view controller. Let me know if you need help with this controller as I've used it quite a bit. – JiuJitsuCoder Aug 08 '13 at 21:25