Some typos fixed

This commit is contained in:
vakrilov
2015-08-03 17:13:56 +03:00
parent 117be96d5c
commit fe84ff0097
3 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ class IOSApplication implements definition.iOSApplication {
this.addNotificationObserver(UIApplicationDidEnterBackgroundNotification, this.didEnterBackground);
this.addNotificationObserver(UIApplicationWillTerminateNotification, this.willTerminate);
this.addNotificationObserver(UIApplicationDidReceiveMemoryWarningNotification, this.didReceiveMemoryWarning);
this.addNotificationObserver(UIDeviceOrientationDidChangeNotification, this.oreintationDidChange);
this.addNotificationObserver(UIDeviceOrientationDidChangeNotification, this.orientationDidChange);
}
get nativeApp(): UIApplication {
@ -162,7 +162,7 @@ class IOSApplication implements definition.iOSApplication {
exports.notify({ eventName: definition.lowMemoryEvent, object: this, android: undefined, ios: UIApplication.sharedApplication() });
}
private oreintationDidChange(notification: NSNotification) {
private orientationDidChange(notification: NSNotification) {
var orientation = UIDevice.currentDevice().orientation;
if (this._currentOrientation !== orientation) {

View File

@ -1,5 +1,5 @@
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="onPageLoaded" unloaded="onPageUnloaded" navigatedTo="pageNavigatedTo">
<GridLayout>
<TextView text="{{ oreintation }}" />
<TextView text="{{ orientation }}" />
</GridLayout>
</Page>

View File

@ -5,14 +5,14 @@ import pageModule = require("ui/page");
var vm = new observable.Observable();
function orientationChanged(data) {
console.log("Orientation changed: " + data.newValue);
vm.set("oreintation", data.newValue);
vm.set("orientation", data.newValue);
}
export function onPageLoaded(args: observable.EventData) {
var page = <pageModule.Page>args.object;
application.on(application.orientationChangedEvent, orientationChanged, page);
page.bindingContext = vm;
vm.set("oreintation", "not changed");
vm.set("orientation", "not changed");
}
export function onPageUnloaded(args: observable.EventData) {