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

Custom button height #207

Closed
mrtv opened this issue Jun 13, 2016 · 2 comments
Closed

Custom button height #207

mrtv opened this issue Jun 13, 2016 · 2 comments

Comments

@mrtv
Copy link

mrtv commented Jun 13, 2016

Hi,
I couldn't find any way to change the height of alert buttons. It would be really nice to have this option.

@dogo
Copy link
Owner

dogo commented Jun 17, 2016

currently the only way is :

   // Init Alert

    // Add button
    SCLButton *button = [alertView addButton:LocalizedString(@"Button") actionBlock:^{
        completionBlock();
    }];

    // change frame size
    CGRect okButtonFrame = button.frame;
    okButtonFrame.size.height = DESIRED_HEIGHT;
    button.frame = okButtonFrame;

   // Show alert

@twostraws
Copy link

In case anyone else comes across this: this code doesn't actually work as you'd expect, because even though you can change the height of any button the alert view won't be resized to take that new size into account.

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

No branches or pull requests

3 participants