Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (20 sloc) 0.614 kb
//
// SegmentController.m
// JMML
//
// Created by Walsh, John on 7/14/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "SegmentController.h"
@implementation SegmentController
- (void)setSelectedSegmentIndex:(NSInteger)toValue
{
// Trigger UIControlEventValueChanged even when re-tapping the selected segment.
if (self.selectedSegmentIndex == toValue) {
[super setSelectedSegmentIndex:UISegmentedControlNoSegment]; // notify first
// [self sendActionsForControlEvents:UIControlEventValueChanged]; // then unset
} else {
[super setSelectedSegmentIndex:toValue];
}
}
@end
Jump to Line
Something went wrong with that request. Please try again.