DavidK
unread,Jun 5, 2009, 5:40:16 PM6/5/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RTFM: Development for Mobile Devices
UISegmentedControls with only two segments will toggle when you press
any portion of the control in the 2.X OS. This is supposedly changing
in 3.0, but for now, here is the work around:
@property(nonatomic, assign) BOOL toggleWhenTwoSegments;
@end
@implementation UISegmentedControl(ToggleControl)
@dynamic toggleWhenTwoSegments;
- (BOOL) toggleWhenTwoSegments {
return ( _segmentedControlFlags.dontAlwaysToggleForTwoSegments ==
0 );
}
- (void) setToggleWhenTwoSegments: (BOOL) flag {
_segmentedControlFlags.dontAlwaysToggleForTwoSegments = !flag;
}
@end
You can put this above the @implementation in whatever file needs it
and then call [mySegmentedControl setToggleWhenTwoSegments:NO];
P.S. Jeff, where is that custom cell height code?