- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPathPretty simple, when you find the right location to add right line(s) of code.
{
InfoViewController *info = [[InfoViewController alloc] init];
info.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:info animated:YES];
[info release];
}
Showing posts with label accessory. Show all posts
Showing posts with label accessory. Show all posts
Tuesday, September 21, 2010
How to Hide UITabBar
Sometimes you need to show a single stand-alone UIView without letting user change tabs. For example there is a list, where you provide an info view using a disclosure accessory button. The question is then: how to hide UITabBar:
Tuesday, May 25, 2010
How to Create Custom Map Annotation Button
Custom accessory button for MKPinAnnotationView right side, create inside MKMapViewDelegate protocol mapView:viewForAnnotation method:
Usually sample codes use UIButtonTypeDetailDisclosure as right button, but you can't use that unless you really show additional details. For anything else, you must use a custom button.UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; [button setImage:[UIImage imageNamed:@"myButton.png"] forState:UIControlStateNormal]; view.rightCalloutAccessoryView = button;
Labels:
accessory,
delegate,
iphone,
map,
MKMapViewDelegate,
MKPinAnnotationView,
UIButton,
UIButtonTypeDetailDisclosure,
UIImage
Subscribe to:
Posts (Atom)