I'm trying to create a CustomAlertview using CustomIOS7AlertView, with text and image. Because I read that with simple AlertView is not possible to set a maximun height when we add an image...
My problem is this: I created the CustomAlertView with the image, but I can not in any way, that for the IPAD (in landscape) it is shown in landscape mode. It is always displayed as vertical.
I've tried rotating the customAlertview, but I have not succeeded ...
Could anyone help me?
This is my code:
UIView * vista = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 500, 500)];
UIImageView *imgView;
if (([[UIDevice currentDevice].model rangeOfString:@"iPad"].location!=NSNotFound)) {
imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 400, 400)];
} else {
imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
}
[imgView setImage:img];
[vista addSubview:imgView];
CustomIOS7AlertView *alertView = [[CustomIOS7AlertView alloc] init];
[alertView setContainerView:vista];
[alertView show];
Thank you!!!