trailingOffset
引き出しが表示される下(右)からのオフセット値を返します
@property CGFloat trailingOffsetvar trailingOffset: CGFloat
解説
引き出しが表示される下(右)からのオフセット値を返します。
設定値
長さ
Objective-C@property CGFloat trailingOffsetvar trailingOffset: CGFloat
フレームワーク
ApplicationKit
クラス
NSDrawer
使用可能
10.0
更新時のバージョン
OS X 10.10.2
関連記事(外部サイト)
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction1:(id)sender { [drawer open]; [drawer setTrailingOffset:50.0]; NSLog([NSString stringWithFormat:@"leadingOffset=%.1f",[drawer trailingOffset]]); } - (IBAction)myAction2:(id)sender { [drawer close]; } @end
//NSDrawer contentSize //NSDrawer leadingOffset //NSDrawer maxContentSize //NSDrawer minContentSize //NSDrawer trailingOffset var theDrawer006 : NSDrawer = NSDrawer(contentSize: NSMakeSize(100.0, 100.0), preferredEdge: 1 ) //preferredEdge 0=左、1=下、2=右、3=上 func buttonAction006(sender: AnyObject){ var theWindow : NSWindow = (sender as NSButton).window! //drawerを表示/非表示 theDrawer006.toggle(theWindow) NSLog("size = (%.2f,%.2f)", Float(theDrawer006.contentSize.width),Float(theDrawer006.contentSize.height)) NSLog("leadingOffset = (%.2f)", Float(theDrawer006.leadingOffset)) NSLog("maxContentSize = (%.2f,%.2f)", Float(theDrawer006.maxContentSize.width),Float(theDrawer006.maxContentSize.height)) NSLog("minContentSize = (%.2f,%.2f)", Float(theDrawer006.minContentSize.width),Float(theDrawer006.minContentSize.height)) NSLog("trailingOffset = (%.2f)", Float(theDrawer006.trailingOffset)) }