How to customize the UIAlert .. view?

I've customized UIViews

by adding images to make them look like radio buttons or checkboxes, but for my specification I want to make it UIAlertView

look like this ...

enter image description here

Can anyone suggest how to do this? Thank!

+3


source to share


3 answers


Theres a lot of previous questions on this topic , one of them refers to this component which allows you to create custom alerts and action sheets. Maybe a good way to start.



0


source


You can create a custom view and give it a warning animation with this code

    -(void)initialDelayEnded 
{

    alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
    alert_upload.alpha = 1.0;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1/1.5];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)];
    alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
    [UIView commitAnimations];
}

- (void)bounce1AnimationStopped {
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1.5/2];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(bounce2AnimationStopped)];
    alert_upload.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);
    [UIView commitAnimations];
}

- (void)bounce2AnimationStopped {
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1.5/2];
    alert_upload.transform = CGAffineTransformIdentity;
    [UIView commitAnimations];


}

      



alert_upload - UIView.

+1


source


You can create your own custom alert views, Apple will not give up on it until it interacts with the user.

-1


source







All Articles