2
NSRect情報で通知を送信する最善の方法は何ですか?NSRect情報でNSNotificationを投稿する最も良い方法は?
ここに私の現在の解決策(NSStringFromRectを使用)があります。
- (void)postNotificationForDirtyRect:(NSRect)rect
{
NSDictionary *userInfo =
[NSDictionary dictionaryWithObject: NSStringFromRect(rect)
forKey: ILDirtyRect];
NSNotificationCenter *ncenter = [NSNotificationCenter defaultCenter];
[ncenter postNotificationName: ILDocumentBecomeDirtyRectNotification
object: self
userInfo: userInfo];
}
ただし、これがrect構造体を送信する最適な方法かどうかはわかりません。
優秀!ありがとうございました。 – cocoafan