0
Я хочу передать объект UIInterfaceOrientation в словаре пользовательской информации NSNotification. Как я могу это достичь?iOS: Как отправить объект UIInterfaceOrientation через NSNotification
Я хочу передать объект UIInterfaceOrientation в словаре пользовательской информации NSNotification. Как я могу это достичь?iOS: Как отправить объект UIInterfaceOrientation через NSNotification
Заверните внутри NSNumber:
id orientationObject = [NSNumber numberWithInteger:UIInterfaceOrientationPortrait];
[userinfo setObject:orientationObject forKey:@"orientation"];
// pass around ...
UIInterfaceOrientation orientation = (UIInterfaceOrientation)[[userinfo objectForKey:@"orientation"] integerValue];