Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Might not be your problem, but if you are comparing 2 string you should be using isEqualToString: not isEqual:


Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	
	if ([[tableList objectAtIndex:indexPath.row] isEqual:@"First View"])
 
Might not be your problem, but if you are comparing 2 string you should be using isEqualToString: not isEqual:


Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	
	if ([[tableList objectAtIndex:indexPath.row] isEqual:@"First View"])

Thanks
 
Open up the debugger console in Xcode. What does it say about the run time exception that you're getting?
 
I don't think you've opened the debugger console. From the menu bar choose Run > Console. If your code uses NSLog or printf that's where the output goes. And when you have a run time exception some output is printed there that tells what kind of error you've encountered.
 
I don't think you've opened the debugger console. From the menu bar choose Run > Console. If your code uses NSLog or printf that's where the output goes. And when you have a run time exception some output is printed there that tells what kind of error you've encountered.

Oh my bad sorry, it says
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ThirdViewController" nib but the view outlet was not set.'"'

HMMM...? i found that the third view was names ThirdView NOT ThirdViewController like it should have, fixed the first error i got, then i got this! So i made a new XIB and now it seem its not set with an outlet. How do i do that?
 
UIViewController has a built in IBOutlet called view. You need to set the value of that outlet in IB. Set it to the top level view in the nib.

You can view all the outlets set for your File's Owner by control-click on the file's owner in the nib. Make sure your nib window is set to list view. You'll see a little black window that shows all the outlets and some other stuff.
 
there are mainly:rolleyes: two reasons to get that error :

1. You have not given File Owner the UIViewController class (By default it comes in 3.0. You need to set it in 2.2)
2. You have not made the connection with the View properly.

Check your file owners connections properly .

:)
 
Ok i got it up and running and it works great, i just rewrote the whole thing, must have just been a missing connection or something cos it worked first time now!! :)

Anyway, one last question, is it at al possible t change the colours of the top bar in a table view, right now its the default 'blue' i hate that, i want my app to look a little more interesting, can i change that? how would i do that if its possible?
Or can i change the colour of the cells??

Thanks for all the help guys!! ;)
 
Anyway, one last question, is it at al possible t change the colours of the top bar in a table view, right now its the default 'blue' i hate that, i want my app to look a little more interesting, can i change that? how would i do that if its possible?
Or can i change the colour of the cells??
There are two simple ways to change your navBar's style/color: 1) barStyle property, or 2) tintColor property.

P.S. Please don't edit your OP and replace it with a "fixed" post. That kinda removes the impetus of the entire thread.
 
There are two simple ways to change your navBar's style/color: 1) barStyle property, or 2) tintColor property.

P.S. Please don't edit your OP and replace it with a "fixed" post. That kinda removes the impetus of the entire thread.

Thanks, found that in the documentation!! Thanks for all the help... :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.