1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # File generated by objcwrapper
17 # Partial wrapper of basic UIKit services.
20 import cocoa
::foundation
23 # Rectangular area on the screen
24 extern class UIView in "ObjC" `{ UIView * `}
27 new in "ObjC" `{ return [[UIView alloc] init]; `}
29 # Wraps: `UIView.addSubview`
30 fun add_subview
(view
: UIView) in "ObjC" `{
31 [self addSubview: view];
34 # Wraps: `UIView.removeFromSuperview`
35 fun remove_from_superview
in "ObjC" `{
36 [self removeFromSuperview];
39 # Wraps: `UIView.sizeToFit`
40 fun size_to_fit
in "ObjC" `{
44 # Wraps: `UIView.frame =`
45 fun set_frame
(x
, y
, w
, h
: Float) in "ObjC" `{
46 self.frame = CGRectMake(x, y, w, h);
49 # Wraps: `UIView.bounds =`
50 fun set_bounds
(x
, y
, w
, h
: Float) in "ObjC" `{
51 self.bounds = CGRectMake(x, y, w, h);
54 # Wraps: `UIView.center =`
55 fun set_center
(x
, y
: Float) in "ObjC" `{
56 self.center = CGPointMake(x, y);
59 # Wraps: `UIView.userInteractionEnabled =`
60 fun user_interaction_enabled
=(value
: Bool) in "ObjC" `{
61 self.userInteractionEnabled = value;
64 # Wraps: `UIView.translatesAutoresizingMaskIntoConstraints =`
65 fun translates_autoresizing_mask_into_constraits
=(value
: Bool) in "ObjC" `{
66 self.translatesAutoresizingMaskIntoConstraints = value;
69 # Wraps: `UIView.backgroundColor =`
70 fun background_color
=(color
: UIColor) in "ObjC" `{
71 self.backgroundColor = color;
74 # Wraps: `[self viewPrintFormatter]`
75 #fun view_print_formatter: UIViewPrintFormatter in "ObjC" `{
76 #return [self viewPrintFormatter];
79 # Wraps: `[self drawRect:(CGRect)rect forViewPrintFormatter:(UIViewPrintFormatter)formatter]`
80 #fun draw_rect_for_view_print_formatter(rect: CGRect, formatter: UIViewPrintFormatter) in "ObjC" `{
81 # [self drawRect: rect forViewPrintFormatter: formatter];
85 # Coordinates an app displays on a device screen
86 extern class UIWindow in "ObjC" `{ UIWindow * `}
89 new in "ObjC" `{ return [[UIWindow alloc] init]; `}
91 # Wraps: `[self makeKeyAndVisible]`
92 fun make_key_and_visible
in "ObjC" `{
93 [self makeKeyAndVisible];
97 # Manages a set of views
98 extern class UIViewController in "ObjC" `{ UIViewController * `}
102 return [[UIViewController alloc
]initWithNibName
:nil bundle
:nil
];
106 fun view: UIView in "ObjC" `{ return self.view; `}
109 fun view
=(view
: UIView) in "ObjC" `{ self.view = view; `}
111 # Wraps: `self.title
`
112 fun title: NSString in "ObjC" `{ return self.title; `}
114 # Wraps: `self.title`
115 fun title
=(title
: NSString) in "ObjC" `{ self.title = title; `}
118 # Base class for control objects
119 extern class UIControl in "ObjC" `{ UIControl * `}
122 # Wraps: `self.enabled`
123 fun enabled
: Bool in "ObjC" `{
127 # Wraps: `self.enabled =`
128 fun enabled
=(enabled
: Bool) in "ObjC" `{
129 self.enabled = enabled;
133 # Button on the touch screen
134 extern class UIButton in "ObjC" `{ UIButton * `}
137 new(kind: UIButtonType) in "ObjC" `{ return [UIButton buttonWithType: kind]; `}
139 # Wraps: `[self titleLabel]`
140 fun title_label
: UILabel in "ObjC" `{
141 return [self titleLabel];
144 # Wraps: `[self setTitle forState]`
145 fun title
=(text
: NSString) in "ObjC" `{
146 [self setTitle:text forState:UIControlStateNormal];
149 # Wraps: `[self currentTitle]`
150 fun current_title
: NSString in "ObjC" `{
151 return [self currentTitle];
155 # Style of `UIButton`
156 extern class UIButtonType in "ObjC" `{ UIButtonType `}
157 new custom in "ObjC" `{ return UIButtonTypeCustom; `}
158 new system
in "ObjC" `{ return UIButtonTypeSystem; `}
159 new detail_disclosure in "ObjC" `{ return UIButtonTypeDetailDisclosure; `}
160 new info_light
in "ObjC" `{ return UIButtonTypeInfoLight; `}
161 new info_dark in "ObjC" `{ return UIButtonTypeInfoDark; `}
162 new contact_add
in "ObjC" `{ return UIButtonTypeContactAdd; `}
163 new rounded_rect in "ObjC" `{ return UIButtonTypeRoundedRect; `}
166 # Read-only text view
167 extern class UILabel in "ObjC" `{ UILabel * `}
170 new in "ObjC" `{ return [[UILabel alloc] init]; `}
172 # Wraps: `UILabel.text`
173 fun text
: NSString in "ObjC" `{
177 # Wraps: `UILabel.text`
178 fun text
=(text
: NSString) in "ObjC" `{
182 # Wraps: `UILabel.font`
183 #fun font: UIFont in "ObjC" `{
184 # return [self font];
187 # Wraps: `UILabel.textColor`
188 fun text_color
: UIColor in "ObjC" `{
189 return [self textColor];
192 # Wraps: `UILabel.textColor`
193 fun text_color
=(color
: UIColor) in "ObjC" `{
194 self.textColor = color;
197 # Wraps: `UILabel.shadowColor`
198 fun shadow_color
: UIColor in "ObjC" `{
199 return [self shadowColor];
202 # Wraps: `UILabel.shadowOffset`
203 #fun shadow_offset: CGSize in "ObjC" `{
204 # return [self shadowOffset];
207 # Wraps: `UILabel.textAlignment`
208 #fun text_alignment: NSTextAlignment in "ObjC" `{
209 # return [self textAlignment];
212 # Wraps: `UILabel.lineBreakMode`
213 #fun line_break_mode: NSLineBreakMode in "ObjC" `{
214 # return [self lineBreakMode];
217 # Wraps: `UILabel.attributedText`
218 #fun attributed_text: NSAttributedString in "ObjC" `{
219 # return [self attributedText];
222 # Wraps: `UILabel.highlightedTextColor`
223 fun highlighted_text_color
: UIColor in "ObjC" `{
224 return [self highlightedTextColor];
227 # Wraps: `UILabel.highlighted`
228 #fun highlighted: Bool in "ObjC" `{
229 # return [self highlighted];
232 # Wraps: `UILabel.userInteractionEnabled`
233 #fun user_interaction_enabled: Bool in "ObjC" `{
234 # return [self userInteractionEnabled];
237 # Wraps: `UILabel.enabled`
238 #fun enabled: Bool in "ObjC" `{
239 # return [self enabled];
242 # Wraps: `UILabel.numberOfLines`
243 fun number_of_lines
: Int in "ObjC" `{
244 return [self numberOfLines];
247 # Wraps: `UILabel.adjustsFontSizeToFitWidth`
248 fun adjusts_font_size_to_fit_width
: Bool in "ObjC" `{
249 return [self adjustsFontSizeToFitWidth];
252 # Wraps: `UILabel.adjustsLetterSpacingToFitWidth`
254 #fun adjusts_letter_spacing_to_fit_width: Bool in "ObjC" `{
255 # return [self adjustsLetterSpacingToFitWidth];
258 # Wraps: `UILabel.minimumFontSize`
260 #fun minimum_font_size: Float in "ObjC" `{
261 # return [self minimumFontSize];
264 # Wraps: `UILabel.baselineAdjustment`
265 #fun baseline_adjustment: UIBaselineAdjustment in "ObjC" `{
266 # return [self baselineAdjustment];
269 # Wraps: `UILabel.minimumScaleFactor`
270 fun minimum_scale_factor
: Float in "ObjC" `{
271 return [self minimumScaleFactor];
274 # Wraps: `UILabel.preferredMaxLayoutWidth`
275 fun preferred_max_layout_width
: Float in "ObjC" `{
276 return [self preferredMaxLayoutWidth];
279 # Wraps: `[self textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines]`
280 #fun text_rect_for_bounds_limited_to_number_of_lines(bounds: CGRect, number_of_lines: Int): CGRect in "ObjC" `{
281 # return [self textRectForBounds: bounds limitedToNumberOfLines: number_of_lines];
284 # Wraps: `[self drawTextInRect:(CGRect)rect]`
285 #fun draw_text_in_rect(rect: CGRect) in "ObjC" `{
286 # [self drawTextInRect: rect];
290 # Color data with opacity
291 extern class UIColor in "ObjC" `{ UIColor * `}
294 # Wraps: `[self initWithWhite
:(CGFloat)white alpha
:(CGFloat)alpha
]`
295 new init_with_white_alpha(white, alpha: Float) in "ObjC" `{
296 return [[UIColor alloc
] initWithWhite
: white alpha
: alpha
];
299 # Wraps: `[self initWithHue
:(CGFloat)hue saturation
:(CGFloat)saturation brightness
:(CGFloat)brightness alpha
:(CGFloat)alpha
]`
300 new init_with_hue_saturation_brightness_alpha(hue, saturation, brightness, alpha: Float) in "ObjC" `{
301 return [[UIColor alloc
] initWithHue
: hue saturation
: saturation brightness
: brightness alpha
: alpha
];
304 # Wraps: `[self initWithRed
:(CGFloat)red green
:(CGFloat)green blue
:(CGFloat)blue alpha
:(CGFloat)alpha
]`
305 new init_with_red_green_blue_alpha(red, green, blue, alpha: Float) in "ObjC" `{
306 return [[UIColor alloc
] initWithRed
: red green
: green blue
: blue alpha
: alpha
];
309 # Wraps: `[self initWithCGColor
:(CGColorRef)cgColor
]`
310 #new init_with_cg_color(cg_color: CGColorRef) in "ObjC" `{
311 # return [[UIColor alloc] initWithCGColor: cg_color];
314 # Wraps: `[self initWithPatternImage:(UIImage)image]`
315 #new init_with_pattern_image(image: UIImage) in "ObjC" `{
316 # return [[UIColor alloc] initWithPatternImage: image];
319 # Wraps: `[self initWithCIColor:(CIColor)ciColor]`
320 #new init_with_ci_color(ci_color: CIColor) in "ObjC" `{
321 # return [[UIColor alloc] initWithCIColor: ci_color];
324 # Wraps: `[UIColor blackColor]`
325 new black_color
in "ObjC" `{ return [UIColor blackColor]; `}
327 # Wraps: `[UIColor darkGrayColor
]`
328 new dark_gray_color in "ObjC" `{ return [UIColor darkGrayColor]; `}
330 # Wraps: `[UIColor lightGrayColor]`
331 new light_gray_color
in "ObjC" `{ return [UIColor lightGrayColor]; `}
333 # Wraps: `[UIColor whiteColor
]`
334 new white_color in "ObjC" `{ return [UIColor whiteColor]; `}
336 # Wraps: `[UIColor grayColor]`
337 new gray_color
in "ObjC" `{ return [UIColor grayColor]; `}
339 # Wraps: `[UIColor redColor
]`
340 new red_color in "ObjC" `{ return [UIColor redColor]; `}
342 # Wraps: `[UIColor greenColor]`
343 new green_color
in "ObjC" `{ return [UIColor greenColor]; `}
345 # Wraps: `[UIColor blueColor
]`
346 new blue_color in "ObjC" `{ return [UIColor blueColor]; `}
348 # Wraps: `[UIColor cyanColor]`
349 new cyan_color
in "ObjC" `{ return [UIColor cyanColor]; `}
351 # Wraps: `[UIColor yellowColor
]`
352 new yellow_color in "ObjC" `{ return [UIColor yellowColor]; `}
354 # Wraps: `[UIColor magentaColor]`
355 new magenta_color
in "ObjC" `{ return [UIColor magentaColor]; `}
357 # Wraps: `[UIColor orangeColor
]`
358 new orange_color in "ObjC" `{ return [UIColor orangeColor]; `}
360 # Wraps: `[UIColor purpleColor]`
361 new purple_color
in "ObjC" `{ return [UIColor purpleColor]; `}
363 # Wraps: `[UIColor brownColor
]`
364 new brown_color in "ObjC" `{ return [UIColor brownColor]; `}
366 # Wraps: `[UIColor clearColor]`
367 new clear_color
in "ObjC" `{ return [UIColor clearColor]; `}
369 # Wraps: `UIColor.CGColor`
370 #fun cg_color: CGColorRef in "ObjC" `{
371 # return [self CGColor];
374 # Wraps: `UIColor.CIColor`
375 #fun ci_color: CIColor in "ObjC" `{
376 # return [self CIColor];
379 # Wraps: `[self set]`
380 fun set
in "ObjC" `{ [self set]; `}
382 # Wraps: `[self setFill
]`
383 fun set_fill in "ObjC" `{ [self setFill]; `}
385 # Wraps: `[self setStroke]`
386 fun set_stroke
in "ObjC" `{ [self setStroke]; `}
388 # Wraps: `[self getWhite
:(CGFloat)white alpha
:(CGFloat)alpha
]`
389 #fun get_white_alpha(white: Float, alpha: Float): Bool in "ObjC" `{
390 # return [self getWhite: white alpha: alpha];
393 # Wraps: `[self getHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha]`
394 #fun get_hue_saturation_brightness_alpha(hue: Float, saturation: Float, brightness: Float, alpha: Float): Bool in "ObjC" `{
395 # return [self getHue: hue saturation: saturation brightness: brightness alpha: alpha];
398 # Wraps: `[self getRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha]`
399 #fun get_red_green_blue_alpha(red: Float, green: Float, blue: Float, alpha: Float): Bool in "ObjC" `{
400 # return [self getRed: red green: green blue: blue alpha: alpha];
403 # Wraps: `[self colorWithAlphaComponent:(CGFloat)alpha]`
404 fun color_with_alpha_component
(alpha
: Float): UIColor in "ObjC" `{
405 return [self colorWithAlphaComponent: alpha];
408 # Wraps: `[self CGColor]`
409 #fun cg_color: CGColorRef in "ObjC" `{
410 # return [self CGColor];
413 # Wraps: `[UIColor groupTableViewBackgroundColor]`
414 new group_table_view_background_color
in "ObjC" `{ return [UIColor groupTableViewBackgroundColor]; `}
416 # Wraps: `[UIColor lightTextColor
]`
417 new light_text_color in "ObjC" `{ return [UIColor lightTextColor]; `}
419 # Wraps: `[UIColor darkTextColor]`
420 new dark_text_color
in "ObjC" `{ return [UIColor darkTextColor]; `}
423 # Wraps: `[UIColor colorWithWhite
:(CGFloat)white alpha
:(CGFloat)alpha
]`
424 #fun ui_color_color_with_white_alpha(white: Float, alpha: Float): UIColor in "ObjC" `{
425 # return [UIColor colorWithWhite: white alpha: alpha];
428 # Wraps: `[UIColor colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha]`
429 #fun ui_color_color_with_hue_saturation_brightness_alpha(hue: Float, saturation: Float, brightness: Float, alpha: Float): UIColor in "ObjC" `{
430 # return [UIColor colorWithHue: hue saturation: saturation brightness: brightness alpha: alpha];
433 # Wraps: `[UIColor colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha]`
434 #fun ui_color_color_with_red_green_blue_alpha(red: Float, green: Float, blue: Float, alpha: Float): UIColor in "ObjC" `{
435 # return [UIColor colorWithRed: red green: green blue: blue alpha: alpha];
438 # Wraps: `[UIColor colorWithCGColor:(CGColorRef)cgColor]`
439 #fun ui_color_color_with_cg_color(cg_color: CGColorRef): UIColor in "ObjC" `{
440 # return [UIColor colorWithCGColor: cg_color];
443 # Wraps: `[UIColor colorWithPatternImage:(UIImage)image]`
444 #fun ui_color_color_with_pattern_image(image: UIImage): UIColor in "ObjC" `{
445 # return [UIColor colorWithPatternImage: image];
448 # Wraps: `[UIColor colorWithCIColor:(CIColor)ciColor]`
449 #fun ui_color_color_with_ci_color(ci_color: CIColor): UIColor in "ObjC" `{
450 # return [UIColor colorWithCIColor: ci_color];
454 extern class UITextField in "ObjC" `{ UITextField * `}
457 new in "ObjC" `{ return [[UITextField alloc] init]; `}
459 # Wraps: `UITextField.text`
460 fun text
: NSString in "ObjC" `{
464 # Wraps: `UITextField.text`
465 fun text
=(text
: NSString) in "ObjC" `{
469 # Wraps: `UITextField.secureTextEntry`
470 fun secure_text_entry
=(value
: Bool) in "ObjC" `{
471 self.secureTextEntry = value;
474 # Wraps: `UITextField.placeholder`
475 fun placeholder
=(text
: NSString) in "ObjC" `{ self.placeholder = text; `}
478 # Lays out a collection of views in either a column or a row
479 extern class UIStackView in "ObjC" `{ UIStackView * `}
483 return [[UIStackView alloc] init];
486 # Wraps: `[self addArrangedSubview:(UIView)view]`
487 fun add_arranged_subview
(view
: UIView) in "ObjC" `{
488 [self addArrangedSubview: view];
491 # Wraps: `[self removeArrangedSubview:(UIView)view]`
492 fun remove_arranged_subview
(view
: UIView) in "ObjC" `{
493 [self removeArrangedSubview: view];
496 # Wraps: `[self insertArrangedSubview:(UIView)view atIndex:(NSUInteger)stackIndex]`
497 fun insert_arranged_subview_at_index
(view
: UIView, stack_index
: Int) in "ObjC" `{
498 [self insertArrangedSubview: view atIndex: stack_index];
501 # Wraps: `[self initWithArrangedSubviews:(NSArray)views]`
502 #new init_with_arranged_subviews(views: NSArray) in "ObjC" `{
503 # return [[UIStackView alloc] initWithArrangedSubviews: views];
506 # Wraps: `UIStackView.arrangedSubviews`
507 #fun arranged_subviews: NSArray in "ObjC" `{
508 # return [self arrangedSubviews];
511 # Wraps: `UIStackView.axis`
512 fun axis
: UILayoutConstraintAxis in "ObjC" `{ return [self axis]; `}
514 # Wraps: `UIStackView.axis
=`
515 fun axis=(value: UILayoutConstraintAxis) in "ObjC" `{ self.axis = value; `}
517 # Wraps: `UIStackView.distribution`
518 fun distribution
: UIStackViewDistribution in "ObjC" `{ return [self distribution]; `}
520 # Wraps: `UIStackView.distribution
=`
521 fun distribution=(value: UIStackViewDistribution) in "ObjC" `{ self.distribution = value; `}
523 # Wraps: `UIStackView.alignment`
524 fun alignment
: UIStackViewAlignment in "ObjC" `{ return [self alignment]; `}
526 # Wraps: `UIStackView.alignment
=`
527 fun alignment=(value: UIStackViewAlignment) in "ObjC" `{ self.alignment = value; `}
529 # Wraps: `UIStackView.spacing`
530 fun spacing
: Float in "ObjC" `{ return [self spacing]; `}
532 # Wraps: `UIStackView.spacing
=`
533 fun spacing=(value: Float) in "ObjC" `{ self.spacing = value; `}
535 # Wraps: `UIStackView.baselineRelativeArrangement`
536 fun baseline_relative_arrangement
: Bool in "ObjC" `{
537 return self.baselineRelativeArrangement;
540 # Wraps: `UIStackView.baselineRelativeArrangement`
541 fun baseline_relative_arrangement
=(value
: Bool) in "ObjC" `{
542 self.baselineRelativeArrangement = value;
545 # Wraps: `UIStackView.layoutMarginsRelativeArrangement`
546 fun layout_margins_relative_arrangement
: Bool in "ObjC" `{
547 return self.layoutMarginsRelativeArrangement;
550 # Wraps: `UIStackView.layoutMarginsRelativeArrangement`
551 fun layout_margins_relative_arrangement
=(value
: Bool) in "ObjC" `{
552 self.layoutMarginsRelativeArrangement = value;
556 # Defines the orientation of the arranged views in `UIStackView`
557 extern class UILayoutConstraintAxis in "ObjC" `{ NSInteger `}
558 new horizontal in "ObjC" `{ return UILayoutConstraintAxisHorizontal; `}
559 new vertical
in "ObjC" `{ return UILayoutConstraintAxisVertical; `}
562 # Defines the size and position of the arranged views along the `UIStackView`'s axis
563 extern class UIStackViewDistribution in "ObjC" `{ NSInteger `}
564 new horizontal
in "ObjC" `{ return UILayoutConstraintAxisHorizontal; `}
565 new fill in "ObjC" `{ return UIStackViewDistributionFill; `}
566 new fill_equally
in "ObjC" `{ return UIStackViewDistributionFillEqually; `}
567 new fill_proportionally in "ObjC" `{ return UIStackViewDistributionFillProportionally; `}
568 new equal_spacing
in "ObjC" `{ return UIStackViewDistributionEqualSpacing; `}
569 new equal_centering in "ObjC" `{ return UIStackViewDistributionEqualCentering; `}
572 # Defines the layout of the arranged views perpendicular to the `UIStackView`'s axis
573 extern class UIStackViewAlignment in "ObjC" `{ NSInteger `}
574 new fill in "ObjC" `{ return UIStackViewAlignmentFill; `}
575 new leading
in "ObjC" `{ return UIStackViewAlignmentLeading; `}
576 new top in "ObjC" `{ return UIStackViewAlignmentTop; `}
577 new baseline
in "ObjC" `{ return UIStackViewAlignmentFirstBaseline; `}
578 new center in "ObjC" `{ return UIStackViewAlignmentCenter; `}
579 new trailing
in "ObjC" `{ return UIStackViewAlignmentTrailing; `}
580 new bottom in "ObjC" `{ return UIStackViewAlignmentBottom; `}
581 new last_baseline
in "ObjC" `{ return UIStackViewAlignmentLastBaseline; `}
584 # View to display and edit hierarchical lists of information
585 extern class UITableView in "ObjC" `{ UITableView * `}
588 # Wraps: `[self initWithFrame:(CGRect)frame style:(UITableViewStyle)style]`
589 new (style
: UITableViewStyle) in "ObjC" `{
590 return [[UITableView alloc] initWithFrame: [[UIScreen mainScreen] bounds] style:style];
593 # Wraps: `[self reloadData]`
594 fun reload_data
in "ObjC" `{ [self reloadData]; `}
596 # Wraps: `self.autoresizingMask
=`
597 fun autoresizing_mask in "ObjC" `{
598 self.autoresizingMask
= UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
601 # Wraps: `self.delegate
=`
602 fun delegate=(delegate: UITableViewDelegate) in "ObjC" `{ self.delegate = delegate; `}
604 # Wraps: `self.dataSource =`
605 fun data_source
=(source
: UITableViewDataSource) in "ObjC" `{ self.dataSource = source; `}
607 # Wraps: `[self dequeueReusableCellWithIdentifier
]`
608 fun dequeue_reusable_cell_with_identifier(identifier: NSString): UITableViewCell in "ObjC" `{
609 return [self dequeueReusableCellWithIdentifier
:identifier
];
613 # Delegate for a `UITableView` to configure selection, sections, cells and more
614 extern class UITableViewDelegate in "ObjC" `{ id<UITableViewDelegate> `}
618 # Mediator the data model for a `UITableView`
619 extern class UITableViewDataSource in "ObjC" `{ id<UITableViewDataSource> `}
623 # Cell of a `UITableViewCell`
624 extern class UITableViewCell in "ObjC" `{ UITableViewCell * `}
627 new (identifier
: NSString) in "ObjC" `{
628 return [[UITableViewCell alloc]
629 initWithStyle:UITableViewCellStyleDefault
630 reuseIdentifier:identifier];
633 # Wraps: `[self textLabel]`
634 fun text_label
: UILabel in "ObjC" `{ return [self textLabel]; `}
636 # Wraps: `[self contentView
]`
637 fun content_view: UIView in "ObjC" `{ return [self contentView]; `}
640 # Style of a `UITableView`
641 extern class UITableViewStyle in "ObjC" `{ UITableViewStyle* `}
644 new plain in "ObjC" `{ return UITableViewStylePlain; `}
645 new grouped
in "ObjC" `{ return UITableViewStyleGrouped; `}
649 extern class UISwitch in "ObjC" `{ UISwitch * `}
652 new in "ObjC" `{ return [[UISwitch alloc] init]; `}
654 # Wraps: `UISwitch.onTintColor
`
655 # fun on_tint_color: UIColor in "ObjC" `{
656 # return [self onTintColor];
659 # Wraps: `UISwitch.tintColor`
660 # fun tint_color: UIColor in "ObjC" `{
661 # return [self tintColor];
664 # Wraps: `UISwitch.thumbTintColor`
665 # fun thumb_tint_color: UIColor in "ObjC" `{
666 # return [self thumbTintColor];
669 # Wraps: `UISwitch.onImage`
670 # fun on_image: UIImage in "ObjC" `{
671 # return [self onImage];
674 # Wraps: `UISwitch.offImage`
675 # fun off_image: UIImage in "ObjC" `{
676 # return [self offImage];
679 # Wraps: `UISwitch.on`
680 fun on
: Bool in "ObjC" `{
684 # Wraps: `[self setOn:(BOOL)on animated:(BOOL)animated]`
685 fun set_on_animated
(on
: Bool, animated
: Bool) in "ObjC" `{
686 [self setOn: on animated: animated];
690 # Support for displaying content larger than the window
691 extern class UIScrollView in "ObjC" `{ UIScrollView* `}
694 new in "ObjC" `{ return [[UIScrollView alloc] init]; `}