ianb821 / IBActionSheet

Customizable iOS 7 style UIActionSheet
MIT License
307 stars 65 forks source link

If I initialize with no buttons, and then use addButton to add buttons, the layout is incorrect #2

Closed ba01ei closed 11 years ago

ianb821 commented 11 years ago

Sorry to hear that, what is the code you're using to create the action sheet? I'd like to recreate it so that I can get it fixed for you.

ba01ei commented 11 years ago

Oh it's ok. I guess I'm just running into some edge cases.

If I do this:

self.standardIBAS = [[IBActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Other", @"Buttons", nil];
[self.standardIBAS addButtonWithTitle:@"I'm new"];
[self.standardIBAS showInView:self.view];

The layout will look good, but when I tap "Buttons", it says I'm tapping "Other".

If I do this:

self.standardIBAS = [[IBActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"Other", @"Buttons", nil];
[self.standardIBAS addButtonWithTitle:@"I'm new"];
[self.standardIBAS showInView:self.view];

The bottom corners of the "Buttons" button seem to be not right.

With UIActionSheet all these will work as expected.

ianb821 commented 11 years ago

Holy smokes, good catch, there were a lot of bugs in addButtonWithTitle:! Thanks! I think that should have gotten them taken care of. I'll leave this open until you make sure it's all working on your end. Let me know if you see any other issues or if that takes care of it for you. And thanks for contributing, I think the alternate init method was a great addition!

ba01ei commented 11 years ago

Thanks a lot. I checked and it's working now.

ianb821 commented 11 years ago

Great, glad to hear it! :) Let me know if you find anything else!