initWithImage method

UIBarButtonItem initWithImage(
  1. UIImage? image, {
  2. required UIBarButtonItemStyle style,
  3. ObjCObjectBase? target,
  4. required Pointer<ObjCSelector> action,
})

initWithImage:style:target:action:

Implementation

UIBarButtonItem initWithImage(
  UIImage? image, {
  required UIBarButtonItemStyle style,
  objc.ObjCObjectBase? target,
  required ffi.Pointer<objc.ObjCSelector> action,
}) {
  objc.checkOsVersionInternal('UIBarButtonItem.initWithImage:style:target:action:', iOS: (false, (2, 0, 0)));
  final _ret = _objc_msgSend_13sbrg9(
    this.ref.retainAndReturnPointer(),
    _sel_initWithImage_style_target_action_,
    image?.ref.pointer ?? ffi.nullptr,
    style.value,
    target?.ref.pointer ?? ffi.nullptr,
    action,
  );
  return UIBarButtonItem.castFromPointer(_ret, retain: false, release: true);
}