moved NSNotificationCenter to setup function

This commit is contained in:
Alexsandersky 2016-03-06 19:32:41 +04:00
parent 1b39bae749
commit 205f4fedf5
1 changed files with 3 additions and 3 deletions

View File

@ -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) {