wimagguc / ios-custom-alertview

Custom UIAlertView. Continue adding images and UIViews to dialogs in iOS7+
Other
1.66k stars 394 forks source link

Improvement Suggestion #101

Open rodrigobusata opened 8 years ago

rodrigobusata commented 8 years ago

I added the division lines in my version of the lib and would like share with you.

- (void)addButtonsToView: (UIView *)container
    ...
for (int i=0; i<[_buttonTitles count]; i++) {
    ...

CGFloat x = container.frame.size.width / [_buttonTitles count];
for (int i=1; i<[_buttonTitles count]; i++) {
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(x*i, container.bounds.size.height - buttonHeight - buttonSpacerHeight, buttonSpacerHeight, buttonHeight)];
    lineView.backgroundColor = divColor;
    [container addSubview:lineView];
}