使用JASidePanelViewController实现UITabViewController

时间:2015-05-19 08:55:11

标签: ios uiviewcontroller uitabview jasidepanels

我正在使用JASidePanel实施UITabViewController但我要解决一些问题。

目前我的分类视图控制器有UITabView

enter image description here

滑动后显示类似

的类别

enter image description here

但我想只滑动一个viewcontroller而不是UITabViewController

这是Baseviewcontroller中的代码,它是JASidePanelViewController

的子类
  - (void)viewDidLoad
   {
     [super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
    self.navigationItem.rightBarButtonItem = self.leftButtonForCenterPanel;
    self.navigationItem.rightBarButtonItem.tintColor = [UIColor grayColor];

  }

  -(void) awakeFromNib
  {
   [self setRightPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"CategoryViewController"]];
   [self setCenterPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"tabVC"]];

  }

感谢您的帮助

2 个答案:

答案 0 :(得分:0)

使用MMDrawerController非常容易集成。

https://github.com/mutualmobile/MMDrawerController

答案 1 :(得分:0)

   //first of all create tab bar and four navigation controller
    IBOutlet UIView *TabbarView;
    UINavigationController* childNavCtrl1;
    UINavigationController* childNavCtrl2;
    UINavigationController* childNavCtrl3;
    UINavigationController* childNavCtrl4;
    UINavigationController* childNavCtrl5;


viewDidLoad{
FavouriteVC * objFav = [[FavouriteVC alloc] init];
objFav.extendedLayoutIncludesOpaqueBars = YES;
childNavCtrl1 = [[UINavigationController alloc] initWithRootViewController:mRiviHomeVC];
childNavCtrl1.navigationBarHidden = YES;

//same do for rest of three view controller 


now whenever user tap on any tab bar 


[self.view addSubview:childNavCtrl1.view] ;// for this u need to check condition when u need to show which view controller