Created
May 16, 2013 16:26
-
-
Save amitpdev/5593016 to your computer and use it in GitHub Desktop.
UIButton with custom image in place of UITable's accessoryView ( right arrow > )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a MAP button in place of the cell's accessoryView | |
UIImage *image = [UIImage imageNamed:@"checkin-fb-place.png"]; | |
UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; | |
UIButton *mapButton = [[UIButton alloc] initWithFrame:imageView.frame]; | |
[mapButton setImage:image | |
forState:UIControlStateNormal ]; | |
[mapButton addTarget:self action:@selector(mapAction:) | |
forControlEvents:UIControlEventTouchDown]; | |
cell.accessoryView = mapButton; | |
[imageView release]; | |
[mapButton release]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment