By Jordan Coff
JCSegmentMenu is a light-weight front end for a tab control. Use it, love it, fork it, do stuff.
- Drag a UIView onto your storyboard
- Do autolayout stuff
- Set the class to JCSegmentMenu
- Set the delegate
- Create a referencing outlet
- Initialize the menu
[_segmentMenu setDelegate:self];
UIButton* b1 = [_segmentMenu defaultSegmentButtonWithOptions:@{@"type":@"image", @"imageName":image1}];
UIButton* b2 = [_segmentMenu defaultSegmentButtonWithOptions:@{@"type":@"image", @"imageName":image2}];
UIButton* b3 = [_segmentMenu defaultSegmentButtonWithOptions:@{@"type":@"image", @"imageName":image3}];
UIButton* b4 = [_segmentMenu defaultSegmentButtonWithOptions:@{@"type":@"image", @"imageName":image4}];
[_segmentMenu setSegmentButtons:@[b1, b2, b3, b4]];The menu alerts the delegate when a segment is pressed.
@protocol JCSegmentMenuDelegate <NSObject>
@optional
-(void)button:(UIButton*)sender pressedAtIndex:(NSInteger) index;
@end@property (nonatomic) CGFloat topSepHeight;
@property (nonatomic) CGFloat bottomSepHeight;
@property (nonatomic) CGFloat pointerHeight;
@property (nonatomic) UIColor* separatorColor;Size, background color, etc are customizable using IB and autolayout.
Please create a Github issue if you have any questions, suggestions, or comments.



