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

ross.32

macrumors 6502
Original poster
May 27, 2007
259
0
I have a UITableView that contains a list of every NEXRAD weather radar (in the form of a custom object called a RadarSite)in the United States. The radars are sorted into different sections by their state. If I specify a RadarSite object, I need to have a method that will return the NSIndexPath for that particular RadarSite. Is their an easy way to achieve this? Thanks in advance!
 
So you get this array of RadarSites from somewhere, populate the table with them, and don't know which RadarSite is in which row?

You need to structure the way you enter data in to the UITableView. So, if you section them by state, have an NSDictionary with the state as the key and a sorted Array of RadarSites as the values. Then you can select the correct value from the section and correct RadarSite either by row or by searching for matching data (maybe using tags on the cells).
 
Thanks for the help. I ended up getting it to work using an embedded for loop.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.