基本的属性和用法:
_contentSwitch = [[HMSegmentedControl alloc] initWithSectionTitles:@[MGJLPLocalizedString(@"lifestyle_publish_what_i_posts", @"我发表的"),
MGJLPLocalizedString(@"lifestlye_publish_what_i_like", @"我喜欢的"),
MGJLPLocalizedString(@"lifestyle_publish_bought", @"已购买的")]];
_contentSwitch.frame = CGRectMake(0, NAVBAR_HEIGHT, FULL_WIDTH, 55);
_contentSwitch.backgroundColor = [UIColor clearColor];
_contentSwitch.selectionIndicatorLocation = HMSegmentedControlSelectionIndicatorLocationDown;
_contentSwitch.textColor = [UIColor whiteColor];
_contentSwitch.selectionIndicatorColor = MGJ_TextPink;
_contentSwitch.selectedTextColor = MGJ_TextPink;
_contentSwitch.font = FONT(16.f);
_contentSwitch.selectionIndicatorHeight = 1.5f;
[_contentSwitch addTarget:self
action:@selector(contentSwitch:)
forControlEvents:UIControlEventValueChanged];