Tuesday, October 15, 2013

Subclassing UILocalNotification does not work

When I initialize a subclass of UILocalNotification like so:

Noticiation* _notification = [[Notification alloc] init];
NSLog(@"%@", [_notification class]);

It prints out UIConcreteLocalNotification.  Trying to call methods or set properties on the subclass will result in an unrecognized selector error.

It seems that UILocalNotification is an abstract class which is implemented by the private class UIConcreteLocalNotification.

http://stackoverflow.com/questions/8580782/possible-to-subclass-uilocalnotification-and-change-default-close-button-text

No comments:

Post a Comment