Another experiment with SwiftUI 4.0

Overview


SleepStories

Tentang Project

Di Figma Communities ada banyak UI Design yang menarik apabila bisa dibuat versi riil aplikasinya khususnya aplikasi iOS. Dan saya iseng aja mencoba membuat versi SwiftUI dari desain tersebut.

Rencana Kerja

Mengikuti desain yang ada, berikut ini beberapa fitur yang rencananya akan dibuat (kalo gak mager):

  • Custom NavigationView
  • TabView
  • Play Audio Files
  • Read data from JSON files
  • Search Functions
  • GridView
  • Some Animation

Screenshot

Tech Stack Yang Digunakan

Swift Trello Postman Alfred Prezi

Kenapa SwiftUI?

SwiftUI sangat cocok sekali untuk prototyping. Bisa digunakan sebagai design tools, dan juga bisa jadi guidelines ketika nanti membuat aplikasi versi UIKit nya (yang lebih diterima pasar Indonesia).

Bisa jadi kelak penggunaan SwiftUI akan ramai juga di Indonesia.

Yang jelas sih selama proses bikin prototype pake SwiftUI, menyenangkan sekali.

Meskipun saat file README ini ditulis, projectnya masih belum selesai (baru sekitar 25%), tapi banyak hal yang bisa di eksplorasi terutama teknik reusable component dan integrasi dengan UIKit.

Instalasi:

  • Double click pada file SleepStories.xcodeproj
  • Pilih iOS simulator kesukaanmu and you are ready to go

Eksplorasi Project

Syntax Description
Project Structure By default SwiftUI mengencourage MVVM pattern. Meskipun project ini belum menggunakan design pattern tersebut, tapi project structurenya sudah mengarah kesana. Tinggal implementasi Combine Framework untuk mengadopsi MVVM pattern.
Custom Modifier Hasil ngulik-ngulik, ternyata di SwiftUI kita bisa bikin custom modifier dan ini cukup seru. Kayak bikin template.
Generic Meskipun SwiftUI terlihat mudah, namun pada case tertentu pengetahuan tentang bahasa pemrograman Swift tetaplah diperlukan. Contohnya tentang Generic. Bagaimana kita membuat fungsi untuk parsing dan decode data JSON.
Constant Beberapa komponen UI yang sifatnya static, akan lebih rapih lagi apabila dibuat dalam satu file khusus yang kita berinama Constant.swift. Nanti di dalam file tersebut kita tinggal bikin variable-variable constant yang dibutuhkan untuk kemudian di panggil di instance lainnya
Routing Syukurlah di SwiftUI routing nya sangat-sangat gampang. Folder yang kita buat itu tidak lantas berpengaruh ketika memanggil komponen tertentu. Folder (atau Group) dibuat hanya untuk memudahkan pengelompokkan file saja dan bukan untuk routing.

Mocking JSON Data

Di project ini saya menggunakan banyak JSON data untuk feeding konten di UI sekaligus buat mocking API buat referensi tim Backend.

Dan untuk memudahkan pekerjaan tersebut, saya menggunakan website yang namanya: Mockaroo

Supported by 💙

Powered by Moya Hexagon

You might also like...
Orbit-swiftui - Orbit design system implemented in SwiftUI for iOS

Orbit is a SwiftUI component library which provides developers the easiest possi

SwiftUI Resume - A simple resume writed by swiftUI + Combine
SwiftUI Resume - A simple resume writed by swiftUI + Combine

SwiftUI_Resume a simple "resume" writed by swiftUI + Combine

SwiftUI-MSALSample - Sample project to login with MSAL using SwiftUI
SwiftUI-MSALSample - Sample project to login with MSAL using SwiftUI

SwiftUI-MSALSample I could not find a good walkthrough on how to implement MSAL

100-Days-of-SwiftUI - Studying through Paul Hudson's 100 Days of SwiftUI
100-Days-of-SwiftUI - Studying through Paul Hudson's 100 Days of SwiftUI

Hacking with SwiftUI 100 Days of SwiftUI Studying through Paul Hudson's "100 Day

Watchos-navlink-swiftui-bug - Example Project to demonstrate bug in SwiftUI when NavigationLink is activated inside a TabView SwiftUI-Card - Simple card ui designed using SwiftUI
SwiftUI-Card - Simple card ui designed using SwiftUI

SwiftUI - Card Simple card ui designed using SwiftUI Preview

Swiftui-pressed-states-example - Examples of Pressed States in SwiftUI

Examples of Pressed States in SwiftUI pressed-states.mp4

IOS15-SwiftUI-InAppPurchaseDemo - In-App Purchase Demo app written with SwiftUI
IOS15-SwiftUI-InAppPurchaseDemo - In-App Purchase Demo app written with SwiftUI

iOS15-SwiftUI-InAppPurchaseDemo In-App Purchase Demo app written with SwiftUI If

SwiftUI Backports - Introducing a collection of SwiftUI backports to make your iOS development easier

SwiftUI Backports Introducing a collection of SwiftUI backports to make your iOS development easier. Many backports support iOS 13+ but where UIKIt fe

Owner
Hidayat Abisena
Currently building https://www.moyahexagon.com | https://www.iswiftbootcamp.com
Hidayat Abisena
An experiment to use Firebase and React Native to build a wwdc.family app

wwdc.family This is an experiment to use Firebase and React Native to build a wwdc.family app. Don't use that source code as reference - I have no pri

WWDC Family 190 Feb 9, 2022
Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another city manually.

⛅️ Cloudy Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another c

Burhan 0 Nov 7, 2021
Macho is yet another mach-o file viewer

Mocha is yet another mach-o file viewer. Requirement: Xcode: 13.*, macOS 13.* It's written in SwiftUI, so it requires the latest version of Xcode and

null 128 Dec 28, 2022
🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].

swiftui-2048 If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo. ✍️ Abou

Astemir Eleev 174 Dec 17, 2022
A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.

WatchShop_UI A simple SwiftUI Application to demonstrate creation of UI using SwiftUI. How to run the project ? Fork the project. Run the project usin

Shubham Kr. Singh 12 Apr 15, 2022
E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.

Touchdown-SwiftUI E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy. Main components and concepts used: @EnvironmentOb

Jorge Martinez 5 Aug 18, 2022
A multiplatform SwiftUI project demonstrating various SwiftUI features.

WikiDemo A multiplatform SwiftUI project demonstrating various SwiftUI features, including creating a master-detail interface. It's a multiplatform ve

Swift Dev Journal 6 Oct 17, 2022
SwiftUI Projects from Udemy SwiftUI Masterclass

SwiftUI Masterclass Repos: AsyncImage (N/A) Fructus (finished): an app for getting information about different fruits. Data comes from json files. Afr

Patrick Spafford 1 Mar 3, 2022
Best architecture for SwiftUI + CombineBest architecture for SwiftUI + Combine

Best architecture for SwiftUI + Combine The content of the presentation: First of the proposed architectures - MVP + C Second of the proposed architec

Kyrylo Triskalo 3 Sep 1, 2022
Weather-swiftui - An example of using SwiftUI

weather-swiftui An example of using SwiftUI Installation Get openweather api key

null 0 Jan 1, 2022