用拇指和文本填充 uipopover

发布于 2024-09-04 22:24:18 字数 72 浏览 6 评论 0 原文

单击按钮后我正在绘制一个弹出窗口,我希望在弹出窗口中查看一个带有图像和一些文本的方形拇指的网格......

谢谢!

I'm drawing a popover after a button clicked and I wish view into the popover a grid with a square thumb of an image and some text....

thanks!

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

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

发布评论

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

评论(1

荒人说梦 2024-09-11 22:24:18

如果我正确理解您的问题,您希望在 UIPopovercontroller 中拥有自定义视图。这可以通过创建一个具有自己的内容的新 UIViewController 来完成。

然后从加载操作的类中加载 popovercontroller。例子:

myView *theView = [[myView alloc] initWithNibName:@"myView" 
                                           bundle:nil];

UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:theView];
[aPopover setDelegate:self];
[aPopover setPopoverContentSize:CGSizeMake(320, 320) animated:YES];

[theView setPopover:aPopover];
[theView release];

[self.popoverController presentPopoverFromRect:CGRectMake(510,370,0,0) inView:self.view  permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

If I understand your question right, you want to have a custom view in your UIPopovercontroller. This can be done by creating a new UIViewController, with its own content.

Then load you popovercontroller from the class you load the action from. Example:

myView *theView = [[myView alloc] initWithNibName:@"myView" 
                                           bundle:nil];

UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:theView];
[aPopover setDelegate:self];
[aPopover setPopoverContentSize:CGSizeMake(320, 320) animated:YES];

[theView setPopover:aPopover];
[theView release];

[self.popoverController presentPopoverFromRect:CGRectMake(510,370,0,0) inView:self.view  permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文