@@ -104,7 +104,7 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
104104 @param image The image to set.
105105 @param index The index of the segment to set.
106106*/
107- - (void )setImage : (UIImage *)image forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:for :));
107+ - (void )setImage : (UIImage *)image forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:forSegmentAt :));
108108
109109/* *
110110 Replaces the content of an existing segment with a new image,
@@ -115,23 +115,23 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
115115 @param index The index of the segment to set.
116116*/
117117- (void )setImage : (UIImage *)image reversible : (BOOL )reversible
118- forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:reversible:for :));
118+ forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:reversible:forSegmentAt :));
119119
120120/* *
121121 Returns the image that was assigned to a specific segment.
122122 Will return nil if the content at that segment is not an image.
123123
124124 @param index The index at which the image is located.
125125*/
126- - (nullable UIImage *)imageForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(image(for :));
126+ - (nullable UIImage *)imageForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(image(forSegmentAt :));
127127
128128/* *
129129 Sets the content of a given segment to a text label.
130130
131131 @param title The text to display at the segment.
132132 @param index The index of the segment to set.
133133*/
134- - (void )setTitle : (NSString *)title forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:for :));
134+ - (void )setTitle : (NSString *)title forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:forSegmentAt :));
135135
136136/* *
137137 Sets the content of a given segment to a text label, and
@@ -142,53 +142,53 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
142142 @param index The index of the segment to set.
143143*/
144144- (void )setTitle : (NSString *)title reversible : (BOOL )reversible
145- forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:reversible:for :));
145+ forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(set(_:reversible:forSegmentAt :));
146146
147147/* *
148148 Returns the string of the title that was assigned to a specific segment.
149149 Will return nil if the content at that segment is not a string.
150150
151151 @param index The index at which the image is located.
152152*/
153- - (nullable NSString *)titleForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(title (for :));
153+ - (nullable NSString *)titleForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(titleForSegment (for :));
154154
155155/* *
156156 Adds a new text segment to the end of the list.
157157
158158 @param title The title of the new item.
159159*/
160- - (void )addNewSegmentWithTitle : (NSString *)title NS_SWIFT_NAME(addSegment(with :));
160+ - (void )addSegmentWithTitle : (NSString *)title NS_SWIFT_NAME(addSegment(withTitle :));
161161
162162/* *
163163 Adds a new text segment to the end of the list, and optionally makes it reversible.
164164
165165 @param title The title of the new item.
166166 @param reversible Whether the item is reversible or not.
167167*/
168- - (void )addNewSegmentWithTitle : (NSString *)title reversible : (BOOL )reversible NS_SWIFT_NAME(addSegment(with :reversible:));
168+ - (void )addSegmentWithTitle : (NSString *)title reversible : (BOOL )reversible NS_SWIFT_NAME(addSegment(withTitle :reversible:));
169169
170170/* *
171171 Adds a new image segment to the end of the list.
172172
173173 @param image The image of the new item.
174174*/
175- - (void )addNewSegmentWithImage : (UIImage *)image NS_SWIFT_NAME(addSegment(with:));
175+ - (void )addSegmentWithImage : (UIImage *)image NS_SWIFT_NAME(addSegment(with:));
176176
177177/* *
178178 Adds a new image segment to the end of the list, and optionally makes it reversible.
179179
180180 @param image The image of the new item.
181181 @param reversible Whether the item is reversible or not.
182182*/
183- - (void )addNewSegmentWithImage : (UIImage *)image reversible : (BOOL )reversible NS_SWIFT_NAME(addSegment(with:reversible:));
183+ - (void )addSegmentWithImage : (UIImage *)image reversible : (BOOL )reversible NS_SWIFT_NAME(addSegment(with:reversible:));
184184
185185/* *
186186 Inserts a new image segment at the specified index.
187187
188188 @param image The image to set.
189189 @param index The index of the segment to which the image will be set.
190190*/
191- - (void )insertSegmentWithImage : (UIImage *)image atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(_ :at:));
191+ - (void )insertSegmentWithImage : (UIImage *)image atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(with :at:));
192192
193193/* *
194194 Inserts a new image segment at the specified segment index, and optionally makes it reversible.
@@ -198,15 +198,15 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
198198 @param index The index of the segment to which the image will be set.
199199*/
200200- (void )insertSegmentWithImage : (UIImage *)image reversible : (BOOL )reversible
201- atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(_ :reversible:at:));
201+ atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(with :reversible:at:));
202202
203203/* *
204204 Inserts a new title segment at the specified index.
205205
206206 @param title The title to set.
207207 @param index The index of the segment to which the image will be set.
208208*/
209- - (void )insertSegmentWithTitle : (NSString *)title atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(_ :at:));
209+ - (void )insertSegmentWithTitle : (NSString *)title atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(withTitle :at:));
210210
211211/* *
212212 Inserts a new title segment at the specified index, and optionally makes it reversible.
@@ -216,7 +216,7 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
216216 @param index The index of the segment to which the image will be set.
217217*/
218218- (void )insertSegmentWithTitle : (NSString *)title reversible : (BOOL )reversible
219- atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(_ :reversible:at:));
219+ atIndex : (NSInteger )index NS_SWIFT_NAME(insertSegment(withTitle :reversible:at:));
220220
221221/* *
222222 Remove the last segment in the list
@@ -241,37 +241,37 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
241241 @param enabled Whether the segment is enabled or not.
242242 @param index The specific index to enable/disable.
243243*/
244- - (void )setEnabled : (BOOL )enabled forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setEnabled(_:at :));
244+ - (void )setEnabled : (BOOL )enabled forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setEnabled(_:forSegmentAt :));
245245
246246/* *
247247 Returns whether the segment at the specified index is currently enabled or not.
248248
249249 @param index The index to check.
250250*/
251- - (BOOL )isEnabledForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(isEnabled (at:));
251+ - (BOOL )isEnabledForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(isEnabledForSegment (at:));
252252
253253/* *
254254 Sets whether a specific segment is currently reversible or not.
255255
256256 @param reversible Whether the segment is reversible or not.
257257 @param index The specific index to enable/disable.
258258*/
259- - (void )setReversible : (BOOL )reversible forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setReversible(_:at :));
259+ - (void )setReversible : (BOOL )reversible forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setReversible(_:forSegmentAt :));
260260
261261/* *
262262 Returns whether the segment at the specified index is reversible or not.
263263
264264 @param index The index to check.
265265*/
266- - (BOOL )isReversibleForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(isReversible (at:));
266+ - (BOOL )isReversibleForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(isReversibleForSegment (at:));
267267
268268/* *
269269 Sets whether a specific segment is currently in a reversed state or not.
270270
271271 @param reversed Whether the segment is currently reversed or not.
272272 @param index The specific index to enable/disable.
273273*/
274- - (void )setReversed : (BOOL )reversed forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setReversed(_:at :));
274+ - (void )setReversed : (BOOL )reversed forSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(setReversed(_:forSegmentAt :));
275275
276276/* *
277277 Returns whether the segment at the specified index is currently reversed or not.
@@ -280,6 +280,14 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl
280280*/
281281- (BOOL )isReversedForSegmentAtIndex : (NSInteger )index NS_SWIFT_NAME(isReversed(at:));
282282
283+ /* *
284+ Sets which segment is currently selected, and optionally play an animation during the transition.
285+
286+ @param selectedSegmentIndex The index of the segment to select.
287+ @param animated Whether the transition to the newly selected index is animated or not.
288+ */
289+ - (void )setSelectedSegmentIndex : (NSInteger )selectedSegmentIndex animated : (BOOL )animated NS_SWIFT_NAME(setSelectedSegmentIndex(_:animated:));
290+
283291@end
284292
285293NS_ASSUME_NONNULL_END
0 commit comments