Closed MacMannes closed 10 years ago
@MacMannes sorry, I didn't see your PR. @renep fixed this slightly differently and also provided a unit test: 917bc94f645332b6e4355ca294f8b20f7d2e68eb - does this find your approval?
Fixed by #68
Hi, sorry for the late reply.
I think my code is a bit more DRY, but I like the unit test.
Best,
André
@MacMannes Please explain "a bit more DRY"
Hi Oliver,
DRY means Don't Repeat Yourself and the following initialization code is used twice:
_actionsPerIndex = [[NSMutableDictionary alloc] init];
self.delegate = self;
I always try to avoid duplicate lines of code, but these are only two lines, so it is not a big deal.
Please see #73 - this is a more complete solution that you probably like
Thanks,
I like that solution very much.. I totally missed the issue with initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:
, because I didn't use that one in my code.
In iOS 8, DTAlertView dit not work anymore.
The overridden standard init method was not called anymore, so the _actionsPerIndex remained nil and blocks were not executed anymore.
I tested this change on iOS 8 beta4, iOS 7.1 and iOS 6.