macOS/iOS API解説

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

目次

progressMarks

INDEX>AppKit>NSAnimation

進捗状況マーク

Objective-C

@property(copy) NSArray *progressMarks

Swift

var progressMarks: [AnyObject]

解説

進捗状況マーク。

設定値

Objective-C

Swift


フレームワーク

ApplicationKit

クラス

NSAnimation

使用可能

10.4

関連記事(外部サイト)

例文

Objective-C

Swift

    //NSAnimation addProgressMark
    //NSAnimation removeProgressMark
    //NSAnimation progressMarks
    var theAnim013: NSAnimation!
    @IBAction func function013(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
        
        //アニメーション設定
        theAnim013 = NSAnimation(duration: 10.0, animationCurve: NSAnimationCurve.EaseInOut)
        theAnim013.frameRate = 20.0
        theAnim013.delegate = self
        theAnim013.animationBlockingMode = NSAnimationBlockingMode.Blocking
        theAnim013.animationCurve = NSAnimationCurve.EaseInOut
        theAnim013.duration = 5.0
        
        var mark1:NSAnimationProgress = 0.3
        theAnim013.addProgressMark(mark1)
        NSLog("progressMarks a %@", theAnim013.progressMarks.description)
        //->progressMarks a [0.300000011920929]
        
        var mark2:NSAnimationProgress = 0.4
        theAnim013.addProgressMark(mark2)
        NSLog("progressMarks b %@", theAnim013.progressMarks.description)
        //->progressMarks b [0.300000011920929, 0.4000000059604645]
        
        var mark3:NSAnimationProgress = 0.5
        theAnim013.addProgressMark(mark3)
        NSLog("progressMarks c %@", theAnim013.progressMarks.description)
        //->progressMarks c [0.300000011920929, 0.4000000059604645, 0.5]
        
        theAnim013.removeProgressMark(mark3)
        NSLog("progressMarks d %@", theAnim013.progressMarks.description)
        //->progressMarks d [0.300000011920929, 0.4000000059604645]
        
        var mark4:NSAnimationProgress = 0.7
        var mark5:NSAnimationProgress = 0.8
        var mark6:NSAnimationProgress = 0.9
        theAnim013.progressMarks = [mark4,mark5,mark6]
        NSLog("progressMarks e %@", theAnim013.progressMarks.description)
        //->progressMarks e [0.7, 0.8, 0.9]
       
        
    }

編集時バージョン

10.10.3
Swift1.2