refactor(core-modules): implement createNativeView and initNativeView for all components

refactor(core-modules): implement createNativeView and initNativeView for all components
This commit is contained in:
Martin Guillon
2018-09-26 12:59:12 +02:00
committed by Martin Yankov
parent 71107533bb
commit 46705ee332
48 changed files with 632 additions and 521 deletions

View File

@@ -10,14 +10,15 @@ export class Image extends ImageBase {
private _imageSourceAffectsLayout: boolean = true;
private _templateImageWasCreated: boolean;
constructor() {
super();
//TODO: Think of unified way of setting all the default values.
public createNativeView() {
const imageView = UIImageView.new();
imageView.contentMode = UIViewContentMode.ScaleAspectFit;
imageView.userInteractionEnabled = true;
this.nativeViewProtected = imageView;
return imageView;
}
public initNativeView(): void {
super.initNativeView();
this._setNativeClipToBounds();
}