Ok guys, so I have a map view with annotations and when tapped, they display callouts with a disclosure icon on the right. When tapped, this function is called:
- (void)showDetails:(id)sender
{
NSLog(@"showDetails: called!");
NSLog(@"sender: %@",sender);
PermitDetailViewController *permitDetail = [[PermitDetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
NSLog(@"permitDetail.title: %@",permitDetail.title);
permitDetail.title = sender.title; //compiler doesn't like this!
NSLog(@"permitDetail.title: %@",permitDetail.title);
[self.navigationController pushViewController:permitDetail animated:YES];
[permitDetail release];
}
All well and good so far, but I need to know what the callout's title was. I am trying to do sender.title but that ain't working to well... Any ideas?
This is the console output when I change the problematic line to permitDetail.title = self.title;
:
2010-12-02 11:50:06.044 Parking[55413:207] showDetails: called!
2010-12-02 11:50:06.045 Parking[55413:207] sender: <UIButton: 0x8139890; frame = (104 8; 29 31); opaque = NO; autoresize = LM; layer = <CALayer: 0x8139920>>
2010-12-02 11:50:06.045 Parking[55413:207] permitDetail.title: (null)
2010-12-02 11:50:06.045 Parking[55413:207] permitDetail.title: All Permits