Skip to content

Instantly share code, notes, and snippets.

@mbcharbonneau
Last active August 29, 2015 13:57
Show Gist options
  • Save mbcharbonneau/9442103 to your computer and use it in GitHub Desktop.
Save mbcharbonneau/9442103 to your computer and use it in GitHub Desktop.
- (void)viewDidLoad;
{
[super viewDidLoad];
self.shareButton = ({
CGRect frame = CGRectMake( self.view.width - 80.0f, self.view.bottom - 44.0f, 70.0f, 44.0f );
UIButton *button = [[UIButton alloc] initWithFrame:frame];
[button setImage:[UIImage imageNamed:@"share-button-red.png"] forState:UIControlStateNormal];
[button setImage:[UIImage imageNamed:@"share-button-red-highlighted.png"] forState:UIControlStateDisabled];
[button addTarget:self action:@selector(share:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
button;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment