ipad编程:objective-c:弹出窗口中的图像可以做到这一点

发布于 2025-01-01 17:26:50 字数 42 浏览 4 评论 0原文

是否可以使用弹出控制器并在其中包含图像? 单击表格视图单元格时怎么样?

Is it possible for a popover controller and have an image in it?
What about when clicking on a tableview cell?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬花如无物 2025-01-08 17:26:50

我想是这样。我自己从未这样做过,只是将 UIImageView 添加到弹出视图中。

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageName:(img)];
[popoverViewController.view addSubview:imageView];

正如我所说,我自己还没有尝试过,但看看它是否有效。另外,您是否尝试过任何不起作用的方法?显示一些代码。

I would assume so. I've never done this myself but simply add a UIImageView to the popover view.

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageName:(img)];
[popoverViewController.view addSubview:imageView];

As I said I haven't tried this myself but see if it works. Also, have you tried anything that is not working? Show some code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文