Skip to content

A Real-Time Currency Exchange Rate based on MegaBank(兆豐銀行)'s API

Notifications You must be signed in to change notification settings

kr1s0404/SwiftUI_MegaBankCurrencyExchangeRate

Repository files navigation

SwiftUI_MegaBankCurrencyExchangeRate


A Real-Time Currency Exchange Rate base on MegaBank(兆豐銀行)'s API

The base currecny is New Taiwan Dollar(NTD)


Screen Shots


Table of Contents


Description

  • A simple SwiftUI APP to demonstrate how I implent MegaBank Post API and show all the data on iPhone in real-time

  • Unlike the get API, the MegaBank API has to be POST which is another usage in SwiftUI

  • The country flag part was take the currency name and remove the last letter "D" to show country flag. For instance, currency name is "USD", the country flag would be "US", so I used removeLast() founction in the code

  • Project was completed using 100% SwiftUI (No Storyboard)

  • I use a libary called "SwiftyJson" to get a better result on retrieve post API data

  • Design pattern: MVVM(Model-ViewModel-View)

Frameworks


What I Learned:

  • I learned how to call a POST API in SwiftUI
  • Show the country flag without using Apple's emoji
  • Better understandsing on JSON file
  • A new Swift feature, "refreshable" to implent pull to refresh fucntion

How To Use


Author Info

Back To The Top

About

A Real-Time Currency Exchange Rate based on MegaBank(兆豐銀行)'s API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages