ios :: UISwitch :: defaultinit
ios :: UISwitch :: set_on_animated
Wraps:[self setOn:(BOOL)on animated:(BOOL)animated]
core :: Pointer :: address_is_null
Is the address behind this Object at NULL?ios :: UIView :: background_color=
Wraps:UIView.backgroundColor =
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Pointer :: defaultinit
ios :: UIView :: defaultinit
core :: Object :: defaultinit
ios :: UISwitch :: defaultinit
cocoa :: NSObject :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).ios :: UIView :: set_bounds
Wraps:UIView.bounds =
ios :: UISwitch :: set_on_animated
Wraps:[self setOn:(BOOL)on animated:(BOOL)animated]
ios :: UIView :: translates_autoresizing_mask_into_constraits=
Wraps:UIView.translatesAutoresizingMaskIntoConstraints =
ios :: UIView :: user_interaction_enabled=
Wraps:UIView.userInteractionEnabled =
# On/Off button
extern class UISwitch in "ObjC" `{ UISwitch * `}
super UIView
new in "ObjC" `{ return [[UISwitch alloc] init]; `}
# Wraps: `UISwitch.onTintColor`
# fun on_tint_color: UIColor in "ObjC" `{
# return [self onTintColor];
# `}
# Wraps: `UISwitch.tintColor`
# fun tint_color: UIColor in "ObjC" `{
# return [self tintColor];
# `}
# Wraps: `UISwitch.thumbTintColor`
# fun thumb_tint_color: UIColor in "ObjC" `{
# return [self thumbTintColor];
# `}
# Wraps: `UISwitch.onImage`
# fun on_image: UIImage in "ObjC" `{
# return [self onImage];
# `}
# Wraps: `UISwitch.offImage`
# fun off_image: UIImage in "ObjC" `{
# return [self offImage];
# `}
# Wraps: `UISwitch.on`
fun on: Bool in "ObjC" `{
return self.on;
`}
# Wraps: `[self setOn:(BOOL)on animated:(BOOL)animated]`
fun set_on_animated(on: Bool, animated: Bool) in "ObjC" `{
[self setOn: on animated: animated];
`}
end
lib/ios/ui/uikit.nit:648,1--688,3
redef class UISwitch
# Register callbacks on this switch to be relayed to `sender`
private fun set_callback(sender: View)
import View.on_ios_event in "ObjC" `{
NitCallbackReference *ncr = [[NitCallbackReference alloc] init];
ncr.nit_view = sender;
// Pin the objects in both Objective-C and Nit GC
View_incr_ref(sender);
ncr = (__bridge NitCallbackReference*)CFBridgingRetain(ncr);
[self addTarget:ncr action:@selector(nitOnEvent:)
forControlEvents:UIControlEventValueChanged];
`}
end
lib/ios/ui/ui.nit:344,1--359,3