vikramarkaios vikramarkaios - 5 months ago 7x
Objective-C Question

Add tabbar in Home page in Objective c

I need to develop for my project for firstly coming splash screen after then Home scree. In that home screen contains Tabbar in bottom side. Please suggest any one. How to proceed. I need programatically


So, if you want to create a tabbar on a specific view controller:

on ViewController.h:

@property (nonatomic, retain) UITabBarController *tab;

on ViewController.m = [UITabBarController new];

// FirstViewController
FirstViewController *vc1=[[FirstViewController alloc] initWithNibName:nil bundle:nil];
vc1.title=@"First View Controller";
vc1.tabBarItem.image = [UIImage imageNamed:@"viewcontroller1.png"];

SecondViewController *vc2 = [[SecondViewController alloc]initWithNibName:nil bundle:nil];
vc2.tabBarItem.image = [UIImage imageNamed:@"viewcontroller2.png"]; = @[vc1, vc2];