Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone : How to display popup view like controller with image in iPhone?

I want to display small popup view (just like popup view in iPad but here I want in iPhone) in iPhone with image.

How can I do that ?

like image 836
Devang Avatar asked May 21 '11 12:05

Devang


2 Answers

@devang you would certainly appreciate this http://iosdevelopertips.com/open-source/ios-open-source-popover-api-for-iphone-wepopover.html

The other approach is what Mehul suggested. Do let us know if you come across something which corresponds to UIPopover in iPad.

like image 81
Rahul Sharma Avatar answered Nov 14 '22 00:11

Rahul Sharma


You can take UIView dynamically and then add UIImageView in this UIView just like this

    UIView *tmpView = [[UIView alloc] initWithFrame:CGRectMake(XPosition, YPosition, Width, Height)];       
    UIImage *tmpImg = [UIImage imageNamed:@"YourImageName.png"];
    UIImageView *tmpImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, tmpImg.size.width, tmpImg.size.height)];
    tmpImgView.image = tmpImg;
    [self.view addSubview:tmpView];

Hope this will Work....

like image 27
Mehul Mistri Avatar answered Nov 14 '22 01:11

Mehul Mistri