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

Method _setSrc

packages/core/ui/image/index.ios.ts:195–202  ·  view source on GitHub ↗
(value: string | ImageSource | ImageAsset)

Source from the content-addressed store, hash-verified

193 }
194
195 private _setSrc(value: string | ImageSource | ImageAsset) {
196 this._createImageSourceFromSrc(value);
197 if (this.iosSymbolScale) {
198 // when applying symbol scale, contentMode must be center
199 // https://stackoverflow.com/a/65787627
200 this.nativeViewProtected.contentMode = UIViewContentMode.Center;
201 }
202 }
203
204 [srcProperty.setNative](value: string | ImageSource | ImageAsset) {
205 this._setSrc(value);

Calls 1

Tested by

no test coverage detected