NSNotification の userinfo ディクショナリに UIInterfaceOrientation オブジェクトを渡したいです。どうすればそれを達成できますか?
質問する
457 次
1 に答える
3
NSNumber内にラップします。
id orientationObject = [NSNumber numberWithInteger:UIInterfaceOrientationPortrait];
[userinfo setObject:orientationObject forKey:@"orientation"];
// pass around ...
UIInterfaceOrientation orientation = (UIInterfaceOrientation)[[userinfo objectForKey:@"orientation"] integerValue];
于 2012-05-17T08:21:01.897 に答える