Skip to content

Instantly share code, notes, and snippets.

@YuLeiFuYun
Created April 3, 2024 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YuLeiFuYun/cfa8269473696810fe69f4a20077fcea to your computer and use it in GitHub Desktop.
Save YuLeiFuYun/cfa8269473696810fe69f4a20077fcea to your computer and use it in GitHub Desktop.
横向滑动卡片
CardCarouselView($imageURLStrings) { index, itemIdentifier in
KFImage.url(URL(string: itemIdentifier))
}
.cardLayoutSize(widthDimension: .fractionalWidth(0.5), heightDimension: .fractionalHeight(0.2))
.minimumLineSpacing(10)
.pagingThreshold(.fractional(0.9))
.scrollMode(.manual)
.scrollStopAlignment(.head(offset: 20))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment