菜鸟教程小白 发表于 2022-12-13 06:31:01

ios - 如何实现具有多个单元格的 UICollectionVIew


                                            <p><p>我有两个单元格要包含在单个 collectionview 中。它们以锯齿形方式添加,如图所示。任何人都可以帮忙吗? <img src="/image/S8bdj.png" alt="enter image description here"/> </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>要以之字形方式显示图像,您需要创建自定义 View 。
你会从 </p> 那里得到一些信息

<ol>
<li> <a href="https://www.objc.io/issues/3-views/collection-view-layouts/" rel="noreferrer noopener nofollow">https://www.objc.io/issues/3-views/collection-view-layouts/</a> </li>
<li> <a href="http://swiftiostutorials.com/tutorial-creating-custom-layouts-uicollectionview/" rel="noreferrer noopener nofollow">http://swiftiostutorials.com/tutorial-creating-custom-layouts-uicollectionview/</a> </li>
<li> <a href="https://maniacdev.com/2013/06/uicollectionview-layout-that-automatically-organizes-things-in-a-linear-manner-based-on-content-size" rel="noreferrer noopener nofollow">https://maniacdev.com/2013/06/uicollectionview-layout-that-automatically-organizes-things-in-a-linear-manner-based-on-content-size</a> </li>
</ol></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何实现具有多个单元格的 UICollectionVIew,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/29748221/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/29748221/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何实现具有多个单元格的 UICollectionVIew