Tejas Sutar
Tejas Sutar

Reputation: 777

iOS 7 : Call method from subclassed UIAlertView

I've created a subclass of UIAlertView inside which I override following method:

- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated;

The problem is this method is not invoked though I tap any of the buttons on alert view. What might be the problem? Has iOS 7 disallowed subclassing UIAlertView? Plese help.

Upvotes: 0

Views: 182

Answers (2)

Oscar
Oscar

Reputation: 651

From UIAlertView Class Reference:

The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

Upvotes: 0

Jeffery Thomas
Jeffery Thomas

Reputation: 42588

Subclassing UIAlertView has never been supported.

UIAlertView Class Reference

Subclassing Notes

The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

Upvotes: 4

Related Questions