SwiftUI drop-down menu supports List version and ScrollView version (tutorial includes source code)

Actual demand

SwiftUI drop-down menu supports List version and ScrollView version

Value and harvest of this article

After reading this article, you will be able to make the following interface

Screenshot 2020-09-15 9.45.52.png in the afternoon

Jietu20200915-214649.gif

Skills you will master after reading this article

  • Master the basic use of UIScrollView
  • Master the basic use of UIRefreshControl
  • Support List version
  • Support ScrollView version
  • Master UIHostingController

Basic knowledge

UIScrollView

The view that allows scrolling and zooming of the contained view.

class UIScrollView : UIView

Use tutorial

UIScrollView is a superclass of multiple UIKit classes including and. UITableViewUITextView

The central concept of an object (or simply a scroll view) is a view whose origin can be adjusted on the content view. It cuts the content to its frame, which is usually (but not necessarily) consistent with the content of the main window of the application. The scroll view can track the movement of the finger and adjust the origin accordingly. "by"

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/108610965