Iphone sdk- UIAlertView button with image

Could you tell me if uiimage view can be used as uialertview "text" button? I could not find googling answer.

Many thanks

+3
source share
2 answers

Yes, it is possible, but I would not recommend it. You will need to run the UIAlertView routines until you find one that has the correct class, I would assume UIButton and add your UIImageView from above like this:

for (UIView *v in [myAlertView subviews]) {
    if ([v isKindOfClass:[UIButton class]]) {
        //IF I AM THE RIGHT BUTTON
            [v addSubview:myUIImageView];
    }
}

, , "foobar5", , , , , UIImageView.

+4

Source: https://habr.com/ru/post/1719278/


All Articles