AQGridView iPad 方向更改单元格大小调整

发布于 2024-11-07 10:52:44 字数 428 浏览 0 评论 0原文

所以我一直在把头撞在墙上试图解决这个问题。这就是我本质上需要的:

我有一个 AQGridView,用于以纵向或横向显示图像(UIImageView)。如果方向是纵向,则图像将占据整个屏幕 (768x1024),并且该部分工作得很好。然而,在横向中,我需要的是并排放置 2 个图像(512x768)。现在,当方向从纵向变为横向时,当然会显示 2 个单元格,而不是一个,这很好,但我似乎无法使右图像恰好位于左图像的右侧旁边。我尝试了几件事,我怀疑: - (CGRect) gridView: (AQGridView *) gridView adjustmentCellFrame: (CGRect) cellFrame insideGridCellFrame: (CGRect) gridCellFrame

将是我的救世主,但我似乎无法使其正常工作。有什么想法吗?有谁遇到过并解决过类似的问题吗?提前感谢任何帮助!

So I've been banging my head in the wall trying to figure this out. Here is what I need essentially:

I have an AQGridView that is used to display images(UIImageView) in either portrait or landscape orientation. If orientation is portrait then the image just takes up the whole screen (768x1024) and that part is working just nice. However, in landscape what I need is for 2 images to be side by side (512x768). Now when orientation changes from portrait to landscape of course 2 cells are shown instead of one, which is nice but I can't seem to make the right image be precisely next to the right side of the left image. I've tried several things, I suspect:
- (CGRect) gridView: (AQGridView *) gridView adjustCellFrame: (CGRect) cellFrame withinGridCellFrame: (CGRect) gridCellFrame

will be my savior here but I just can't seem to make it work correctly. Any ideas? Anyone who has had and solved a similar problem? Any help is appreciated in advance!

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

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

发布评论

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

评论(1

下雨或天晴 2024-11-14 10:52:44
        [gView setResizesCellWidthToFit:YES];
        [gView setSeparatorStyle:AQGridViewCellSeparatorStyleNone];
        [gView setResizesCellWidthToFit:YES];
        [gView setSeparatorStyle:AQGridViewCellSeparatorStyleNone];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文