From 205f4fedf55d2da3bfa324820ab0008cef189daa Mon Sep 17 00:00:00 2001 From: Alexsandersky Date: Sun, 6 Mar 2016 19:32:41 +0400 Subject: [PATCH] moved NSNotificationCenter to setup function --- SKPhotoBrowser/SKPhotoBrowser.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SKPhotoBrowser/SKPhotoBrowser.swift b/SKPhotoBrowser/SKPhotoBrowser.swift index 41b5273..29df7e6 100644 --- a/SKPhotoBrowser/SKPhotoBrowser.swift +++ b/SKPhotoBrowser/SKPhotoBrowser.swift @@ -157,6 +157,9 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate { modalTransitionStyle = UIModalTransitionStyle.CrossDissolve NSNotificationCenter.defaultCenter().addObserver(self, selector: "handleSKPhotoLoadingDidEndNotification:", name: SKPHOTO_LOADING_DID_END_NOTIFICATION, object: nil) + + // it change delete button frame while rotation of device + NSNotificationCenter.defaultCenter().addObserver(self, selector: "changeOrientation", name: UIApplicationDidChangeStatusBarOrientationNotification, object: nil) } // MARK: - override @@ -241,9 +244,6 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate { // transition (this must be last call of view did load.) performPresentAnimation() - - // it change delete button frame while rotation of device - NSNotificationCenter.defaultCenter().addObserver(self, selector: "changeOrientation", name: UIApplicationDidChangeStatusBarOrientationNotification, object: nil) } public override func viewWillAppear(animated: Bool) {