UIView的動畫事務

        UIView.beginAnimations("1", context: nil)

        UIView.setAnimationDuration(moveDuration)

        UIView.setAnimationRepeatCount(MAXFLOAT)

        UIView.setAnimationRepeatAutoreverses(true)

        horizontalHand.frame.origin.x -= 10

        UIView.commitAnimations()

        

        UIView.beginAnimations("2", context: nil)

        UIView.setAnimationDuration(moveDuration)

        UIView.setAnimationRepeatCount(MAXFLOAT)

        UIView.setAnimationRepeatAutoreverses(true)

        //UIView.setAnimationDelegate(self)

        //UIView.setAnimationDidStopSelector("moveAnimationDidStop")

        verticalHand.frame.origin.y -= 10

        let currDate = NSDate()

        UIView.commitAnimations()

        

        UIView.beginAnimations("3", context: nil)

        UIView.setAnimationDuration(moveDuration)

        UIView.setAnimationRepeatCount(MAXFLOAT)

        UIView.setAnimationRepeatAutoreverses(true)

        UIView.setAnimationStartDate(currDate.dateByAddingTimeInterval(moveDuration))

        verticalFlicker.alpha = 0

        horizontalFlicker.alpha = 0

        UIView.commitAnimations()


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章