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

22,392

Solution 1

@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.

Solution 2

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....

Share:
22,392
Devang
Author by

Devang

iOS developer with 4+ years of experience.

Updated on July 04, 2020

Comments

  • Devang
    Devang almost 4 years

    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 ?

  • Devang
    Devang almost 13 years
    But it will not give same effect as Popoverview gives in iPad. I want same effect in iPhone !
  • Devang
    Devang almost 13 years
    Nice link. But it will allow only text not image. I want to display image.