原文:How to set an action for barbutton item programatically objective-c
Implemented some barbuttons by using below code, UISegmentedControl *button = [[[UISegmentedControl alloc] initWithItems: [NSArray arrayWithObjects:@"", nil]] autorelease]; button.momentary = YES;...