Skip to content

Commit 00cb2f4

Browse files
author
Trent Guillory
committed
More cleanup
1 parent f4e1f0e commit 00cb2f4

File tree

7 files changed

+6
-37
lines changed

7 files changed

+6
-37
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ ScrollViewReactiveHeader(header: {
2424

2525
- [ ] Make `headerOverlay` interactive. At the moment, taps will be interecepted by the overlaid `ScrollView`
2626
- [ ] Add optional callback that reports internally-calculated scroll offset.
27+
- [ ] Remove dependency on `GeometryReader` for calculating status bar height. (at the moment, setting `.edgesIgnoringSafeArea(.top)` will interfere with this package's ability to calculate the height of the status bar. )

ScrollViewReactiveHeaderDemoApp/Sources/Example2/Views/AlbumThumbnail.swift

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
//
2-
// AlbumThumbnail.swift
3-
// SpotifyClone
4-
//
5-
// Created by Trent Guillory on 10/31/20.
6-
//
7-
81
import SwiftUI
92

3+
// MARK: - AlbumThumbnail
4+
105
struct AlbumThumbnail: View {
116
@State var album: Album
12-
7+
138
var body: some View {
149
VStack(alignment: .leading) {
1510
// Image(album.name)
@@ -23,6 +18,8 @@ struct AlbumThumbnail: View {
2318
}
2419
}
2520

21+
// MARK: - AlbumThumbnail_Previews
22+
2623
struct AlbumThumbnail_Previews: PreviewProvider {
2724
static var previews: some View {
2825
AlbumThumbnail(album: NetworkManager.shared.fetchHomeScreen().first!.albums.first!)

ScrollViewReactiveHeaderDemoApp/Sources/Example2/Views/SpotifyHomeView.swift

-29
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,6 @@ struct SpotifyHomeView: View {
5151
}
5252
}, configuration: .init(showStatusBar: true, backgroundColor: .black))
5353
.background(Color.black)
54-
55-
// GeometryReader { geometry in
56-
// ZStack(alignment: .top) {
57-
// HomeHeaderView(
58-
// hPadding: hPadding,
59-
// vPadding: geometry.safeAreaInsets.top + hPadding,
60-
// scrollOffset: $scrollViewOffset)
61-
// ScrollView {
62-
// OffsetReader()
63-
//
64-
// LazyVStack(spacing: vPadding) {
65-
// TopSpacer(topSpace: vPadding)
66-
// ForEach(sections, id: \.order) { section in
67-
// cellView(section: section)
68-
// }
69-
// }
70-
//
71-
// // Spacer
72-
// VStack {}
73-
// .frame(height: 35)
74-
// }
75-
// .coordinateSpace(name: "scrollView")
76-
// .onPreferenceChange(ScrollOffsetPreferenceKey.self, perform: { offset in
77-
// scrollViewOffset = offset
78-
// })
79-
// }
80-
// .background(Color.black)
81-
// .edgesIgnoringSafeArea(.top)
82-
// }
8354
}
8455

8556
func cellView(section: HomeViewSection) -> AnyView {

0 commit comments

Comments
 (0)