macOS/iOS API解説

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

目次

allowsImplicitAnimation

INDEX>AppKit> NSAnimationContext

他のプロパティを暗黙のうちにアニメーション化するか

Objective-C

@property BOOL allowsImplicitAnimation

Swift

var allowsImplicitAnimation: Bool

解説

他のプロパティを暗黙のうちにアニメーション化するか
よくわかっていないけれどこのプロパティをfalse(NO)にすると、アニメーション化しない。

設定値

Objective-C

BOOL

Swift

Bool

クラス

NSAnimationContext

使用可能

10.8

更新時のバージョン

OS X 10.10

参照

関連記事(外部サイト)


core animation - Animating by adding & removing NSLayoutConstraints, instead of adjusting Constants - Stack Overflow


WWDC 2013 Session 213 - Best Practices for Cocoa Animation - ASCIIwwdc


Re: animating an NSStackView

●animator proxy

OS X Animation Technologies

例文

Objective-C

Swift

allowsImplicitAnimation - YouTube

    //NSAnimationContext allowsImplicitAnimation
    @IBOutlet weak var button005: NSButton!
    @IBAction func function005(sender: AnyObject) {
        
        
        
        var redLeftConstraint : NSLayoutConstraint = NSLayoutConstraint(item: button005!,
            attribute: NSLayoutAttribute.Left,
            relatedBy: NSLayoutRelation.Equal,
            toItem: self.button005.superview,
            attribute: NSLayoutAttribute.Left,
            multiplier: 1, constant: 50)
        button005.superview?.addConstraint(redLeftConstraint)
        
        button005.superview?.wantsLayer = true

        NSAnimationContext.runAnimationGroup({ context in
            context.duration = 2.0
            context.allowsImplicitAnimation = true
            self.button005.superview?.layoutSubtreeIfNeeded()
            }, completionHandler: nil)
 
        
    }