Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed designated initializer, so it will work with iOS 8 #67

Closed
wants to merge 1 commit into from
Closed

Conversation

MacMannes
Copy link

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.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.27%) when pulling 7036632 on MacMannes:develop into d5a1e72 on Cocoanetics:develop.

@odrobnik odrobnik added the Bug label Jul 22, 2014
@odrobnik odrobnik added this to the 1.7.2 milestone Jul 22, 2014
renep added a commit that referenced this pull request Jul 22, 2014
@odrobnik
Copy link
Collaborator

@MacMannes sorry, I didn't see your PR. @renep fixed this slightly differently and also provided a unit test: 917bc94 - does this find your approval?

@odrobnik
Copy link
Collaborator

Fixed by #68

@odrobnik odrobnik closed this Jul 22, 2014
@MacMannes
Copy link
Author

Hi, sorry for the late reply.

I think my code is a bit more DRY, but I like the unit test.

Best,

André

@odrobnik
Copy link
Collaborator

@MacMannes Please explain "a bit more DRY"

@MacMannes
Copy link
Author

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.

@odrobnik
Copy link
Collaborator

Please see #73 - this is a more complete solution that you probably like

@MacMannes
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants