GitHub - lamlee/DDActionHeaderView: Header with title and actions, rapid UI component for quick hands on iOS 4
Or set the action items through items property. Items is a NSArray of UIView subclass instances, and the UIView subclass instance can be UIView, UIButton, UIImageView or UIControl, etc. They will be added into a (DDActionHeaderView's width - 20) pixels width and 50 pixel height action picker.
// Create action items, have to be UIView subclass, and set frame position by yourself.
UIButton *facebookButton = [UIButton buttonWithType:UIButtonTypeCustom];
[facebookButton addTarget:self action:@selector(itemAction:) forControlEvents:UIControlEventTouchUpInside];
[facebookButton setImage:[UIImage imageNamed:@"facebook"] forState:UIControlStateNormal];
facebookButton.frame = CGRectMake(0.0f, 0.0f, 50.0f, 50.0f);
facebookButton.imageEdgeInsets = UIEdgeInsetsMake(13.0f, 13.0f, 13.0f, 13.0f);
facebookButton.center = CGPointMake(25.0f, 25.0f);
UIButton *twitterButton = [UIButton buttonWithType:UIButtonTypeCustom];
[twitterButton addTarget:self action:@selector(itemAction:) forControlEvents:UIControlEventTouchUpInside];
[twitterButton setImage:[UIImage imageNamed:@"twitter"] forState:UIControlStateNormal];
twitterButton.frame = CGRectMake(0.0f, 0.0f, 50.0f, 50.0f);
twitterButton.imageEdgeInsets = UIEdgeInsetsMake(13.0f, 13.0f, 13.0f, 13.0f);
twitterButton.center = CGPointMake(75.0f, 25.0f);
self.actionHeaderView.items = [NSArray arrayWithObjects:facebookButton, twitterButton, nil];
Once you set the items array, previous items will be removed from action picker if there is any.