Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rappa819

macrumors newbie
Original poster
Feb 28, 2008
29
0
So I went through this tutorial which was extremely helpful:

http://www.youtube.com/watch?v=LBnPfAtswgw

And after finishing them I was a little disappointed because the tutorial did not tell you how to load a different nib depending on which table item was selected.

So I was wondering is there a way in the method didSelectRowAtIndexPath where I could just have an IF statement to do so, such as:

Code:
if(userSelects rowItem 1){
load this nib
}

I think i've exhausted all my searching capabilities along with my books on iPhone programming.

So if anyone knows how to do this or has a better way of doing so it would be greatly appreciated.
 
Then I must be doing it wrong because every variation I try does not work.

if(indexPath == 1) ?
 
so...

if(((NSIndexPath *)indexPathForRow:(NSUInteger)row inSection:(NSUInteger)section)) == 1)?
 
I think you need to step back a bit and do a bit of background reading as you don't seem to understand the basics. NSIndexPath (through the UIKit extensions) has two properties row and section. You would access those using

indexPathVariableName.row and indexPathVariableName.section
 
yeah, so i'm new. And i was looking for help. I got everything working fine up until this point. All i need to do is a simple if statement that I could do in any other language, but since I don't know objective c I was looking for some insight on how to do it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.