Skip to content

ahyo6127/TravelDiscovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practice Project 1:Travel Discovery

[ Main Practice ]

  • RestFul API:使用 Swift 內建的 網路 API ( URLSession ) 擷取JSON格式的網頁圖片、文字、數值
  • ViewModel:定義 擷取網頁圖片文字數值的 class ,以便處理網頁的請求/回應/數據交換/解碼/錯誤回報
  • 記憶體管理:使用 NavigationLazyView 避免打開主頁就已下載所有分頁,點進分頁的時候再跑就好,以便節省記憶體
  • UI: GeometryReader 製作類似Instagram的圖片格、Picker製作標籤切換頁、 Linear Gradient 製作漸層色、Color(#colorLiteral()) 搭配色碼 製作指定調色

[ import ]

  • Models: Foundation
  • Views: SwiftUI, MapKit, Kingfisher, SDWebImageSwiftUI

[ Third-party Library ]

  • SDWebImage:提供 iOS 圖像下載 ( Objective-C & Swift )。
  • Kingfisher: 提供 iOS 圖像下載 ( Swift )。

[ Main UI ]

  • Home Screen 主頁面 = DiscoverView
  • 支援Dark Mode ( 左Light Mode, 右Dark Mode )
截圖 截圖
  • 主頁面包含:

1.DiscoverCategoriesView 截圖 截圖

2.PopularDestinationsView 截圖 截圖

3.PopularRestaurantsView 截圖 截圖

4.TrendingCreatorsView 截圖 截圖

[ File Description ]

截圖 截圖 截圖 截圖

[ Summary Details of Item ]

--- Home Screen Layout ---
1.NavigationView ScrollViews and Stacking
2.ForEach Hashables and System Images
3.Destinations Row Images and Sizing
4.Restaurants and Trending Creators
5.Linear Gradients and ZStack Layers
6.Project Clean Up and File Organization
7.Reduce Code Duplication with ViewModifiers

--- Travel Categories ---
8.Using NavigationLink to Perform Transitions
9.Perform Networking using ObservableObject
10.Decode JSON Objects and JSON Errors
11.Kingfisher SDWebImage Image Loading
12.Dependency Injection and Network Errors
13.NavigationLazyView Bug Fix

--- Destinations ---
14.Popular Destination Details and Text Fix
15.SwiftUI Map Views and @State Initialization
16.Show Map Markers with Toggle
17.Custom MapAnnotation with RoundedRectangle Borders

--- Swiping with PageViewController ( in Destinations ) ---
18.Show UIViewController with UIViewControllerRepresentable Container
19.Integrate Swiping with UIPageViewController and UIHostingController
20.Inject Images into PageViewController
21.Load Images from Internet in PageViewController
22.Fetch Destination Details from API

--- Restaurants ---
23.Restaurant Details View
24.Fetch PopularDishes Nested JSON
25.Customer Reviews with Ratings

--- Photos Grid View ( in Restaurants )---
26.Restaurant Photos LazyVGrid
27.GeometryReader 3 Column Image Grid
28.Picker Grid List Toggle
29.Present Fullscreen Modal with Photos
30.Correct Page Index for Carousel Modal

--- User View ---
31.Navigate to User Details View
32.Post Card Layout View
33.Fetch UserDetails JSON

About

Practice for myself

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages