2012-05-17 52 views

回答

3

把它包一個NSNumber內:

id orientationObject = [NSNumber numberWithInteger:UIInterfaceOrientationPortrait]; 
[userinfo setObject:orientationObject forKey:@"orientation"]; 

// pass around ... 

UIInterfaceOrientation orientation = (UIInterfaceOrientation)[[userinfo objectForKey:@"orientation"] integerValue];