在视图出现后,Swiftui列表行单元格设置填充 [英] Swiftui List Row Cells set padding after View appears

查看:40
本文介绍了在视图出现后,Swiftui列表行单元格设置填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个标准列表,仅包含一个文本,右侧是用于导航的箭头.但是,在加载列表并显示在屏幕上之后,该列表添加了我认为它们在左侧和右侧添加填充的单元格.但这看起来不太好,所以列表似乎滞后了!

I have a standard List only with one Text and on the right side the arrow for navigation. But after the list is loading and appeared at Screen, the list addapt the cells I think they add padding at the left and at the right. But this is not looking good, so it is looking like the list lags!

List {
                       ForEach(0..<book.chapters) { index in
                           NavigationLink(destination: ReadingView(book: self.book, chapter: index)){
                               Text("Kapitel \(index + 1)")
                           }
                       }
        }


           .navigationBarTitle(Text(book.long_name), displayMode: .inline)

推荐答案

我有相同的问题,但仅在模拟器上.当我在任何手机上运行该应用程序时,无论它有多旧,它都可以像人们期望的那样完美运行.您应该尝试一下.

I have the same issue but only on the simulator. When I’m running the app on any phone, no matter how old, it works perfectly fine as one would expect. You should try that.

啊,现在我看到了移动数据,您在手机上.在这种情况下,您可以向Apple提交错误报告,然后等待并始终使用最新软件.

ah now I see the mobile data, you are on your phone. In that case you can file a bug report to Apple and wait and always use newest software.

这篇关于在视图出现后,Swiftui列表行单元格设置填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆