Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-23-2008, 02:14 PM   #54 (permalink)
RockStrongo
Registered Member
 
Join Date: Aug 2008
Posts: 175
RockStrongo is on a distinguished road
Default

Ok, so I have 2 tab bar items that will be simple views with no navigation. So, I created 2 xib files for them. Im trying to load them, but my app terminates when I click on the tab button and says no view was loaded. Here is the code.....

H file -
Code:
	IBOutlet MyInfoViewController *myMIViewController;
	IBOutlet AboutUsViewController *myAUViewController;

@property (nonatomic, retain) MyInfoViewController *myMIViewController;
@property (nonatomic, retain) AboutUsViewController *myAUViewController;
M file -
Code:
// Tab #2 Setup
	myMIViewController = [[MyInfoViewController alloc] initWithNibName:@"MyInfoView" bundle:nil];	
	myMIViewController.tabBarItem.image = [UIImage imageNamed:@"myinfotabbar25.png"];
		
	// Tab #3 Setup
	myAUViewController = [[AboutUsViewController alloc] initWithNibName:@"AboutUsView" bundle:nil];
	myAUViewController.tabBarItem.image = [UIImage imageNamed:@"infotabbar25.png"];

// Add ViewControllers to tab-bar
	tabBarController.viewControllers = [NSArray arrayWithObjects:
										tableNavController, myMIViewController, myAUViewController, nil];
Any ideas how to load these 2 views from XIB files? If I just alloc/init them, the app works, but of course, the view isnt loaded.
RockStrongo is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,415
Threads: 94,015
Posts: 402,527
Top Poster: BrianSlick (7,978)
Welcome to our newest member, deannme48
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:19 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.