通過重寫以下方法可以隱藏當(dāng)前頁面的狀態(tài)欄
override func prefersStatusBarHidden() -> Bool {
return true
}
以下方法實(shí)現(xiàn)當(dāng)前頁面翻頁的動畫效果
UIView.beginAnimations("animation", context: nil)
UIView.setAnimationDuration(2)
UIView.setAnimationCurve(UIViewAnimationCurve.EaseInOut)
UIView.setAnimationTransition(.FlipFromLeft, forView: self.view, cache: false)
UIView.commitAnimations()
設(shè)置某個view的alpha實(shí)現(xiàn)淡入淡出動畫:
UIView.beginAnimations(nil, context: nil)
UIView.setAnimationDuration(2.0)//設(shè)置動畫時間
self.alertView!.alpha = 1.0
UIView.commitAnimations()