macOS/iOS API解説

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

目次

-boundingRectWithSize:options:attributes:

-(NSRect)boundingRectWithSize:(NSSize)size
         options:(NSStringDrawingOptions)options
         attributes:(NSDictionary *)attributes

解説

レシーバーがオプション仕様optionsを使って描画されるバウンディング矩形と、現在のグラフィックスコンテキストでのaRectの中の他の表示する属性の特性を計算して、返します。
このメソッドから返されたrectは最初のグリフの原点です。

返り値

( NSRect )

なし

引数

( NSSize )size
( NSStringDrawingOptions )options
( NSDictionary * )attributes

フレームワーク

ApplicationKit

クラス

NSString Additions

Instance Methods

使用可能

10.4

参照

-drawInRect:withAttributes:

例文