initWithFrame$1 method

UIControl initWithFrame$1(
  1. CGRect frame, {
  2. UIAction? primaryAction,
})

Initializes the control and adds primaryAction for the UIControlEventPrimaryActionTriggered control event. Subclasses of UIControl may alter or add behaviors around the usage of primaryAction, see subclass documentation of this initializer for additional information.

Implementation

UIControl initWithFrame$1(objc.CGRect frame, {UIAction? primaryAction}) {
  objc.checkOsVersionInternal('UIControl.initWithFrame:primaryAction:', iOS: (false, (14, 0, 0)));
  final $ret = _objc_msgSend_gxusyk(
    object$.ref.retainAndReturnPointer(),
    _sel_initWithFrame_primaryAction_,
    frame,
    primaryAction?.ref.pointer ?? ffi.nullptr,
  );
  return UIControl.fromPointer($ret, retain: false, release: true);
}