Files
Alexander Vakrilov 49ea10b81e fix(layout): IOS Layout not invalidated with custom root (#5724)
* fix(layout): Buuple up layout trough viewControllers

* test: Layout invalidates correctly with different root view

* chore: tslint
2018-04-23 15:47:27 +03:00

26 lines
764 B
TypeScript

import * as observable from "tns-core-modules/data/observable";
import * as stackLayoutModule from "tns-core-modules/ui/layouts/stack-layout";
import * as label from "tns-core-modules/ui/label";
import * as button from "tns-core-modules/ui/button";
export class MyControl extends stackLayoutModule.StackLayout {
constructor() {
super();
var counter: number = 0;
var lbl = new label.Label();
lbl.id = "my-test-label";
var btn = new button.Button();
btn.text = "Tap me!";
btn.on(button.Button.tapEvent, (args: observable.EventData) => {
lbl.text = "Tap " + counter++;
});
this.addChild(lbl);
this.addChild(btn);
this.className = "MyStackLayout";
}
}