3

In ShareKit's install instructions here: http://getsharekit.com/install/

they say to create a share button by putting this in the .m

[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction
 target:self
 action:@selector(share)]

How can I set up a share button with just a UIButton, not a UIBarButton?

1 Answers1

0

Create your UIBUtton normall. Then for the addTarget method use share

so

UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btn.frame = CGRectMake(.....
[btn addTarget:self action:@selector(share) forControlEvents:UIControlEventTouchUpInside];
Amit Shah
  • 4,176
  • 2
  • 22
  • 26