当前位置:网站首页>Xcode preview displays a bug in the content of the list view and its solution
Xcode preview displays a bug in the content of the list view and its solution
2022-06-25 00:35:00 【Giant panda Hou Pei】

summary
We know Xcode Preview of (Preview) It's development SwiftUI Edge tool of interface , It is manifested in :
- Quick display SwiftUI View interface
- Quick test SwiftUI The function of the view
But unfortunately , so far Xcode There are still more or less problems with the preview function of , For example, when a list is displayed under certain conditions , among Cell Display of views (onAppear) And hide (onDisappear) The callback method will not be called :

We hope that noname user Cell Show the user panel at the top of the main view when hidden , And Cell Hide the top user panel when displaying . But as shown above , In any case , None of the top panels show .
Include Xcode 13.4 And the latest Xcode 14beta All have this problem .
that , How to be in Xcode Fix this... In the preview Bug Well ?
Let’s dive in!
Top panel shows and hides logic
As I said before , We hope the following results :
- stay List in noname user Cell Display time , Hide the top user panel
- stay List in noname user Cell When hidden , Show the top user panel
This is by listening to users Cell Of onAppear and onDisappear Events to achieve
边栏推荐
- Activity startup process
- Go crawler framework -colly actual combat (I)
- 5-minute NLP: summary of 3 pre training libraries for rapid realization of NER
- Tiktok wallpaper applet, starlight wallpaper applet version 2.0, upgraded version
- Sliding window technology based on byte in transport layer
- Go crawler framework -colly actual combat (IV) -- Zhihu answer crawl (I)
- [figure database performance and scenario test sharp tool ldbc SNB] series I: introduction to data generator & Application to ges service
- Use of JMeter easynmon
- Several ways for wechat applet to jump to the page are worth collecting
- 2021-02-15
猜你喜欢

传输层 以字节为单位的滑动窗口技术

Go crawler framework -colly actual combat (II) -- Douban top250 crawling

Use and click of multitypeadapter in recycleview

Working principle analysis of kubernetes architecture core components

【Redis实现秒杀业务④】一人一单,不可重复购买
Hyperledger Fabric 2. X dynamic update smart contract

VNC viewer remote connection raspberry pie without display

Meta&伯克利基于池化自注意力机制提出通用多尺度视觉Transformer,在ImageNet分类准确率达88.8%!开源...

Use of navigation and navigationui

Apk slimming compression experience
随机推荐
Zed acquisition
Dynamic effect of canvas lines
I suddenly find that the request dependent package in NPM has been discarded. What should I do?
C# 闭包的垃圾回收
Basic summary of MySQL database knowledge
Signal integrity (SI) power integrity (PI) learning notes (I) introduction to signal integrity analysis
Intensive reading of thinking about markdown
vim使用命令
Working principle analysis of kubernetes architecture core components
不重要的token可以提前停止计算!英伟达提出自适应token的高效视觉Transformer网络A-ViT,提高模型的吞吐量!...
Scrollview height cannot fill full screen
Svg+js keyboard control path
传输层 以字节为单位的滑动窗口技术
【面试题】什么是事务,什么是脏读、不可重复读、幻读,以及MySQL的几种事务隔离级别的应对方法
Android SQLite database
UE4 WebBrowser chart cannot display problems
Use of JMeter
Helm chart warehouse operation
[leaderboard] Carla leaderboard leaderboard leaderboard operation and participation in hands-on teaching
融合模型权限管理设计方案