allowsImplicitAnimation
INDEX>AppKit> NSAnimationContext
他のプロパティを暗黙のうちにアニメーション化するか
@property BOOL allowsImplicitAnimation
var allowsImplicitAnimation: Bool
解説
他のプロパティを暗黙のうちにアニメーション化するか
よくわかっていないけれどこのプロパティをfalse(NO)にすると、アニメーション化しない。
フレームワーク
Appkit
クラス
NSAnimationContext
使用可能
10.8
更新時のバージョン
OS X 10.10
参照
関連記事(外部サイト)
WWDC 2013 Session 213 - Best Practices for Cocoa Animation - ASCIIwwdc
●animator proxy
OS X Animation Technologies
例文
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) }