exyte/ScalingHeaderScrollView hiện có 1.5k sao trên GitHub, viết chủ yếu bằng Swift. A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.
Read Article »
Usage
Put your header and content bodies code into a ScalingHeaderScrollView constructor.
Set the necessary modifiers, see below.
struct ContentView: View {
var body: some View {
ScalingHeaderScrollView {
ZStack {
Rectangle()
.fill(.gray.opacity(0.15))
Image("header")
}
} content: {
Text("↓ Pull to refresh ↓")
.multilineTextAlignment(.center)
.padding()
}
}
}
TabView won't work
Please note that ScalingScrollview is just a ScrollView under the hood, so it works very similar to it. If content's height changes between tabs inside the scroll view, there is no way to keep scroll position nice and stable. Usually when using a TabView, you put separate ScrollViews on every tab, not the other way around. And if you were to put a TabView inside a ScrollView, it wouldn't work as you expect, and neither will putting it inside a ScalingScrollview.
Moreover, TabView gives almost no control over itself (getting/setting its current position, getting tab's content height, etc.), so there is no way to manually mess with its scrollOffset, which is what this library relies heavily upon.
Required parameters
header - @ViewBuilder for your header content - @ViewBuilder for your content
Available modifiers, optional
passes current collapse progress value into progress binding: 0 for not collapsed at all, 1 - for fully collapsed
.collapseProgress(_ progress: Binding<CGFloat>)
allows to set up callback for ScrollView reaching the bottom
isActive - dynamically enable/disable pull-to-refresh, if disabled, loading indicator won't be displayed on pull-to-refresh perform - async closure to be performed on pull-to-refresh, after the closure is done loading indicator will be hidden automatically
allows to set up an action for pull-to-load-more; if not set up loading indicator on pull-to-load-more will never be displayed
isActive - dynamically enable/disable pull-to-load-more, if disabled, loading indicator won't be displayed on pull-to-load-more contentOffset - padding value of the content from the bottom edge when pull-to-load is active perform - async closure to be performed on pull-to-load-more, after the closure is done loading indicator will be hidden automatically
allows content scroll reset, need to change Binding to true
.scrollToTop(resetScroll: Binding<Bool>)
allows to change current header height, need to change state, possible values are .collapsed, .expanded or .custom(CFGloat)
when scrolling up - switch between actual header collapse and simply moving it up (by default moving up)
.allowsHeaderCollapse()
when scrolling down - enable (disabled by default) header scale
.allowsHeaderGrowth()
Enable/disable (disabled by default) header snap. Available modes:
.disabled - Disable header snap.
.immediately - Once you lift your finger header snaps either to min or max height automatically.
.afterFinishAccelerating - At the end of scroll view deceleration the header snaps either to min or max height automatically.
.setHeaderSnapMode(.immediately)
Set custom positions for header snap (explained previous point). Specify any amount of values in 0...1 to set snapping points, 0 - fully collapsed header, 1 - fully expanded
Set custom initial position to which scroll view will be automatically snapped to. Specify a value in 0...1, 0 - fully collapsed header, 1 - fully expanded
PopupView - Toasts and popups library
AnchoredPopup - Anchored Popup grows "out" of a trigger view (similar to Hero animation)
Grid - The most powerful Grid container
AnimatedTabBar - A tabbar with a number of preset animations
MediaPicker - Customizable media picker
Chat - Chat UI framework with fully customizable message cells, input view, and a built-in media picker
CalendarView - Calendar view with fully customizable month/day cells
OpenAI Wrapper lib for OpenAI REST API
AnimatedGradient - Animated linear gradient
ConcentricOnboarding - Animated onboarding flow
FloatingButton - Floating button menu
ActivityIndicatorView - A number of animated loading indicators
ProgressIndicatorView - A number of animated progress indicators
FlagAndCountryCode - Phone codes and flags for every country
SVGView - SVG parser
LiquidSwipe - Liquid navigation animation
exyte/ScalingHeaderScrollView thuộc nhóm Mobile trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về exyte/ScalingHeaderScrollView ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/exyte/ScalingHeaderScrollView là nguồn chính thức.
exyte/ScalingHeaderScrollView có phải mã nguồn mở không?
Có — exyte/ScalingHeaderScrollView phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/exyte/ScalingHeaderScrollView.
exyte/ScalingHeaderScrollView là gì?
exyte/ScalingHeaderScrollView (exyte/ScalingHeaderScrollView) là dự án Swift trên GitHub. Theo mô tả gốc: A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.
exyte/ScalingHeaderScrollView so với các dự án Mobile khác thế nào?
exyte/ScalingHeaderScrollView được TopGit xếp vào nhóm Mobile, với 1.5k sao GitHub và viết bằng Swift. Xem trang chủ đề Mobile trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Vì sao exyte/ScalingHeaderScrollView được xếp vào nhóm Mobile?
TopGit xếp exyte/ScalingHeaderScrollView vào nhóm Mobile dựa trên GitHub topics và mô tả của repo (gắn thẻ: "headerview", "ios", "scrollview"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc ScalingHeaderScrollView có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — chọn một câu hỏi bên dưới và xem AI nói gì về ScalingHeaderScrollView.
Học exyte/ScalingHeaderScrollView có khó không, và cần biết trước những gì?