Hide one segment in SegmentControl iOS . swift

Solution:

We had two options with that to achieve.First one is

1.Set the width to 0.Disable the segment to that.

Objective C:

[seg setWidth:0.1 forSegmentAtIndex:1];
[seg setEnabled:NO forSegmentAtIndex:1];

OR

 [self.seg removeSegmentAtIndex:0 animated:NO];

Swift:

 seg.removeSegment(at: 0, animated: false)


2. Remove the index from the segment Control

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift