-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SwiftUIPagingHelper for better interation with SwiftUI
- Loading branch information
1 parent
b6ac797
commit 2d8de74
Showing
24 changed files
with
592 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
IosApp/Ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "flowstacks", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnpatrickmorgan/FlowStacks", | ||
"state" : { | ||
"revision" : "9629bd329146d4ba476bfdb50d293acbf8ba3f5d", | ||
"version" : "0.3.8" | ||
} | ||
}, | ||
{ | ||
"identity" : "kingfisher", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/onevcat/Kingfisher.git", | ||
"state" : { | ||
"revision" : "3ec0ab0bca4feb56e8b33e289c9496e89059dd08", | ||
"version" : "7.10.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "swiftui-shimmer", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/markiv/SwiftUI-Shimmer", | ||
"state" : { | ||
"revision" : "1f3a620e4abe890d00008cb2af7023d810b433a7", | ||
"version" : "1.4.0" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+75.3 KB
(250%)
IosApp/Ios.xcworkspace/xcuserdata/ashutyagi.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Routes.swift | ||
// Ios | ||
// | ||
// Created by Ashu Tyagi on 15/01/24. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
enum AppRoute: Equatable { | ||
static func == (lhs: AppRoute, rhs: AppRoute) -> Bool { | ||
return lhs.key == rhs.key | ||
} | ||
|
||
case PlaylistDetail( | ||
playlistId: String | ||
) | ||
|
||
case AlbumDetail( | ||
albumId: String | ||
) | ||
|
||
var key: String { | ||
switch self { | ||
case .PlaylistDetail: | ||
return "PlaylistDetail" | ||
case .AlbumDetail: | ||
return "AlbumDetail" | ||
} | ||
} | ||
} | ||
|
||
extension AppRoute { | ||
@ViewBuilder | ||
func getView() -> some View { | ||
switch self { | ||
case.PlaylistDetail(playlistId: let playlistId): | ||
PlaylistDetailScreen(playlisId: playlistId) | ||
case .AlbumDetail(albumId: let albumId): | ||
EmptyView() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// ListErrorItem.swift | ||
// Ios | ||
// | ||
// Created by Ashu Tyagi on 15/01/24. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct ListErrorItem: View { | ||
|
||
var errorMessage: String | ||
var onRetryClicked : () -> Void = {} | ||
|
||
var body: some View { | ||
VStack(spacing: 0) { | ||
|
||
Text(errorMessage) | ||
.foregroundColor(Color.white) | ||
.font(.system(size: 14, weight: .semibold)) | ||
.padding(.vertical, 10) | ||
|
||
Button(action: { | ||
onRetryClicked() | ||
}) { | ||
Text("Retry") | ||
.foregroundColor(Color.black) | ||
.font(.system(size: 14, weight: .semibold)) | ||
.padding(.all, 8) | ||
} | ||
.background(Color.white) | ||
.cornerRadius(12) | ||
} | ||
.padding(.all, 12) | ||
.frame(maxWidth: .infinity) | ||
} | ||
} | ||
|
||
#Preview { | ||
ListErrorItem( | ||
errorMessage: "Som error occurred", | ||
onRetryClicked: {} | ||
) | ||
.background(Color.black) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// ListLoadingItem.swift | ||
// Ios | ||
// | ||
// Created by Ashu Tyagi on 15/01/24. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct ListLoadingItem: View { | ||
|
||
var body: some View { | ||
VStack(alignment: .center, spacing: 0) { | ||
Text("Loading...") | ||
.foregroundColor(.white) | ||
.padding(.vertical, 6) | ||
ProgressView() | ||
.progressViewStyle(CircularProgressViewStyle(tint: Color.white)) | ||
.padding(.all, 10) | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.