macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

animationCurve

INDEX>AppKit>NSAnimation

アニメーションカーブ

Objective-C

@property NSAnimationCurve animationCurve

Swift

var animationCurve: NSAnimationCurve

解説

アニメーションカーブ。

設定値

Objective-C

( NSAnimationCurve )

Swift


フレームワーク

ApplicationKit

クラス

NSAnimation

使用可能

10.4

関連記事(外部サイト)

例文

Objective-C

Swift 1.2

    //NSAnimation animationCurve
    @IBAction func function004(sender: AnyObject) {
        //NSAnimationProgress
        var progMarks : [NSAnimationProgress] =  [
            0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5,
            0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0  ]
        var i :Int
        var count :Int = 20
        //アニメーション設定
        theAnim004 = NSAnimation(duration: 10.0, animationCurve: NSAnimationCurve.EaseInOut)
        
        theAnim004!.frameRate = 20.0
        theAnim004!.delegate = self
        theAnim004!.animationBlockingMode = NSAnimationBlockingMode.Blocking
        theAnim004!.animationCurve = NSAnimationCurve.EaseInOut
        
        //登録
        for (i = 0 ; i<count ; i++){
            theAnim004!.addProgressMark(progMarks[i])
            NSLog("theAnim004 %f",progMarks[i])
        }
        dispatch_async(dispatch_get_main_queue()) {
            self.theAnim004!.startAnimation()
        }
    }

Swift1.1

//NSAnimation animationCurve
    @IBAction func function004(sender: AnyObject) {
        //NSAnimationProgress
        var progMarks : [NSAnimationProgress] =  [
            0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5,
            0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0  ]
        var i :Int
        var count :Int = 20
        //アニメーション設定
        theAnim004 = NSAnimation(duration: 10.0, animationCurve: NSAnimationCurve.EaseInOut)
        
        theAnim004.frameRate = 20.0
        theAnim004.delegate = self
        theAnim004.animationBlockingMode = NSAnimationBlockingMode.Blocking
        theAnim004.animationCurve = NSAnimationCurve.EaseInOut
        
        //登録
        for (i = 0 ; i<count ; i++){
            theAnim004.addProgressMark(progMarks[i])
            NSLog("theAnim004 %f",progMarks[i])
        }
        dispatch_async(dispatch_get_main_queue()) {
            self.theAnim004.startAnimation()
        }
    }

関連記事(外部サイト)

編集時バージョン

10.10.3
Swift1.2