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.
ios :: UIControl :: defaultinit
core :: Object :: defaultinit
core :: Pointer :: defaultinit
cocoa :: NSObject :: defaultinit
ios :: UIView :: defaultinit
ios :: UIButton :: 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 :: UIView :: translates_autoresizing_mask_into_constraits=
Wraps:UIView.translatesAutoresizingMaskIntoConstraints =
ios :: UIView :: user_interaction_enabled=
Wraps:UIView.userInteractionEnabled =
# Button on the touch screen
extern class UIButton in "ObjC" `{ UIButton * `}
super UIControl
new(kind: UIButtonType) in "ObjC" `{ return [UIButton buttonWithType: kind]; `}
# Wraps: `[self titleLabel]`
fun title_label: UILabel in "ObjC" `{
return [self titleLabel];
`}
# Wraps: `[self setTitle forState]`
fun title=(text: NSString) in "ObjC" `{
[self setTitle:text forState:UIControlStateNormal];
`}
# Wraps: `[self currentTitle]`
fun current_title: NSString in "ObjC" `{
return [self currentTitle];
`}
end
lib/ios/ui/uikit.nit:133,1--153,3
redef class UIButton
# Register callbacks on this button 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:UIControlEventTouchUpInside];
`}
end
lib/ios/ui/ui.nit:421,1--436,3