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

前端 未结 3 1424
刺人心
刺人心 2021-02-04 17:30

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 ?

3条回答
  •  离开以前
    2021-02-04 18:13

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

提交回复
热议问题