Here I have 2 views:
WallViewController contains MKMapView, and <
You can do your annotation as object that support MSAnnotation protocol. So when you select your cell - you'll exactly know what object is behind this action. And in that case you - your annotation will be exactly the object you've selected by tapping on UITableViewCell.
So - your object PAWPost just should support MKAnnotation protocol:
@interface PAWPost : NSObject
// Interface here
@end
@implementation PAWPost
// ...
- (CLLocationCoordinate2D)coordinate {
return <#your coordinate here#>;
}
// ...
@end
P.S. You dont need to create new local instance of WallViewController class in didSelectRowAtIndexPath: method. Because at that time your WallViewController will not have MapView. Instead that - create instance of WallViewController before and use pointer to it.