switch in iOS cannot have different size than 51/31. Setting it in onMeasure is late. (#4212)

This commit is contained in:
Hristo Hristov
2017-05-17 13:29:59 +03:00
committed by GitHub
parent fcd626ddf7
commit 585e74e752

View File

@ -37,6 +37,8 @@ export class Switch extends SwitchBase {
this._handler = SwitchChangeHandlerImpl.initWithOwner(new WeakRef(this));
nativeView.addTargetActionForControlEvents(this._handler, "valueChanged", UIControlEvents.ValueChanged);
this.nativeView = nativeView;
this.width = 51;
this.height = 31;
}
get ios(): UISwitch {