MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / createNativeView

Method createNativeView

packages/core/ui/button/index.ios.ts:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 private _stateChangedHandler: ControlStateChangeListener;
18
19 createNativeView() {
20 const nativeView = UIButton.buttonWithType(UIButtonType.System);
21
22 // This is the default for both platforms
23 if (nativeView.titleLabel) {
24 nativeView.titleLabel.textAlignment = NSTextAlignment.Center;
25 }
26 return nativeView;
27 }
28
29 public initNativeView(): void {
30 super.initNativeView();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected