当前位置:网站首页>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
边栏推荐
- Adding, deleting, modifying and checking in low build code
- Tiktok wallpaper applet v1.0.2 function, new arrival function
- 离散数学及其应用 2018-2019学年春夏学期期末考试 习题详解
- Xcode预览(Preview)显示List视图内容的一个Bug及解决
- Single blind box removal, social blind box and friend blind box program source code
- Zed acquisition
- ServerSocket and socket connection
- 腾讯云国际云服务器网络访问丢包问题解决办法
- Scrollview height cannot fill full screen
- VIM use command
猜你喜欢

Working principle analysis of kubernetes architecture core components

Registration method of native method in JNI

Signal integrity (SI) power integrity (PI) learning notes (XXV) differential pair and differential impedance (V)
Design and practice of vivo server monitoring architecture
5-minute NLP: summary of 3 pre training libraries for rapid realization of NER

【微服务|Sentinel】簇点链路|微服务集群环境搭建

MySQL log management

How to reduce the font size of custom controls (optimize the round dot progress bar)

无需显示屏的VNC Viewer远程连接树莓派

The new employee of the Department after 00 is really a champion. He has worked for less than two years. The starting salary of 18K is close to me when he changes to our company
随机推荐
[figure database performance and scenario test sharp tool ldbc SNB] series I: introduction to data generator & Application to ges service
Several ways for wechat applet to jump to the page are worth collecting
Discrete mathematics and its application detailed explanation of exercises in the final exam of spring and summer semester of 2018-2019 academic year
ros(25):rqt_image_view报错Unable to load plugin for transport ‘compressed‘, error string
Outer screen and widescreen wasted? Harmonyos folding screen design specification teaches you to use it
Use coordinatorlayout+appbarlayout+collapsingtoolbarlayout to create a collapsed status bar
Why are life science enterprises on the cloud in succession?
Intensive reading of thinking about markdown
Tiktok wallpaper applet, starlight wallpaper applet version 2.0, upgraded version
Binder mechanism and Aidl communication example
I suddenly find that the request dependent package in NPM has been discarded. What should I do?
Do280openshift access control -- encryption and configmap
More pictures | explain the Nacos parameters in detail!
The new employee of the Department after 00 is really a champion. He has worked for less than two years. The starting salary of 18K is close to me when he changes to our company
2021-09-12
Garbage collection of C closure
Alternative to log4j
2021-04-18
Microsoft won the title of "leader" in the magic quadrant of Gartner industrial Internet of things platform again!
MySQL semi sync replication