|
8 | 8 | *⚠️ Various issues existed, not suitable for the production environment!* |
9 | 9 |
|
10 | 10 | ## Features |
11 | | -- Drop Transition |
12 | | -- Auto Rotation with paging |
13 | | -- Text Effect |
14 | | -- Text Transition |
15 | | -- Fade-in/out Transition/Animation |
16 | | - |
17 | | -## Beautiful Previews |
18 | | -|  |  |  |  | |
19 | | -| --- | --- | --- | --- | |
20 | | -| Apple TV | Final Cut Camera | Find My | Journal | |
| 11 | +- **Two Display Modes:** Choose between dynamic `.carousel` and elegant `.static` layouts. |
| 12 | +- **AsyncImage Support:** Seamlessly load images from remote URLs or local assets. |
| 13 | +- **Drop Transition & Paging:** Dynamic animations for the carousel mode. |
| 14 | +- **Advanced Text Effects:** Beautiful text rendering and transitions. |
| 15 | +- **Feature Lists:** Easily showcase key features in static mode. |
21 | 16 |
|
22 | 17 | ## Environment / Tested on |
23 | | -- 📲 iOS18+ required |
| 18 | +- 📲 iOS 18.0+ required |
24 | 19 | - Swift 6.0 |
25 | | -- iPhone 16 Pro / Pro Max |
26 | | -- Xcode 16.2 (16C5032a) |
| 20 | +- Xcode 16.0+ |
27 | 21 |
|
28 | 22 | ## How to use |
29 | | -0. Open Xcode and (create) a project |
30 | | -1. In **Package Dependencies**, add ```https://github.com/1998code/19-Splash-Screen-for-SwiftUI``` |
31 | | -2. Then ```import SplashScreenKit``` on top |
32 | | -3. Sample Code: |
| 23 | +Add the package to your project: ```https://github.com/1998code/19-Splash-Screen-for-SwiftUI``` |
| 24 | + |
| 25 | +### Carousel Mode (Default) |
| 26 | +The classic interactive experience with rotating images. |
33 | 27 | ```swift |
34 | | -struct ContentView: View { |
35 | | - var body: some View { |
36 | | - SplashScreen( |
37 | | - images: [], |
38 | | - title: "STRING", |
39 | | - product: "STRING", |
40 | | - caption: "STRING", |
41 | | - cta: "STRING" |
42 | | - ) { |
43 | | - // Button Action |
44 | | - } |
45 | | - } |
| 28 | +SplashScreen( |
| 29 | + images: [ |
| 30 | + Photo("ImageName1"), |
| 31 | + Photo("https://example.com/image.jpg") // Remote URLs supported! |
| 32 | + ], |
| 33 | + title: "Welcome to", |
| 34 | + product: "Apple TV", |
| 35 | + caption: "Browse all movies, TV shows, and more.", |
| 36 | + cta: "Watch Now" |
| 37 | +) { |
| 38 | + print("Action Button Tapped") |
46 | 39 | } |
47 | 40 | ``` |
48 | 41 |
|
49 | | -## Project Demo |
50 | | -Path: [Demo/Demo.xcodeproj](https://github.com/1998code/19-Splash-Screen-for-SwiftUI/tree/main/Demo) |
| 42 | +### Static Mode |
| 43 | +A clean, scrollable layout perfect for product introductions. |
| 44 | +```swift |
| 45 | +SplashScreen( |
| 46 | + mode: .static, |
| 47 | + images: [Photo("https://url.to/header_image.jpg")], |
| 48 | + title: "Creator Studio", |
| 49 | + product: "3 months of Creator Studio for free.", |
| 50 | + caption: "Bring your vision to life with powerful apps.", |
| 51 | + features: [ |
| 52 | + SplashFeature(title: "Feature 1", icon: "video"), |
| 53 | + SplashFeature(title: "Feature 2", icon: "waveform") |
| 54 | + ], |
| 55 | + footer: "Terms and conditions apply.", |
| 56 | + cta: "Accept Offer", |
| 57 | + secondaryCta: "See All Plans", |
| 58 | + secondaryAction: { |
| 59 | + print("Secondary action tapped") |
| 60 | + } |
| 61 | +) { |
| 62 | + print("Primary action tapped") |
| 63 | +} |
| 64 | +``` |
51 | 65 |
|
52 | 66 | ## Known Issues |
53 | 67 | **Major** |
54 | | -- Gesture is **disabled** due to multiple bugs |
55 | | - - Dragging (from left to right) is not working due to offset; and |
56 | | - - Dragging (from right to left) works but fails the ```currentIndex``` |
57 | | -- Only compatible with iOS18+, like Apple Invites app |
58 | | -- Only tested on iPhone 16 Pro/Pro Max (Resize problem on small devices) |
59 | | -- Possible memory leakage when inserting too many items into the array |
60 | | - |
61 | | -**Minor** |
62 | | -- The auto-rotation+paging feels like a "Conveyor belt sushi 🍣", not so smooth. |
| 68 | +- Gesture is **disabled** due to multiple bugs in carousel mode. |
| 69 | +- Only compatible with iOS18+, like Apple Invites app. |
| 70 | +- Resizing issues: Carousel mode is optimized for Pro/Pro Max. Static mode includes a ScrollView to handle smaller devices and varying content lengths. |
63 | 71 |
|
64 | 72 | ## Copyright |
65 | 73 | App Store Screenshots © 2025 Apple Inc. |
|
0 commit comments