[Swift] Lightly introduce the logic of the app that passed the selection

In this article, I will introduce the UI and logic of the app that I made by selection. In the same way, people who will make apps by selection from now on, I hope it will be helpful for those who create apps as a portfolio. ✴︎ Please note that there are some parts that cannot be reached because it was made at explosive speed when it was immature.

the top screen

スクリーンショット 2020-11-05 10.56.58.png API used (national version of coronavirus infection status in Japan) https://covid19-japan-web-api.now.sh/api//v1/total I created an app that shows the status of coronavirus infection. Since the purpose is to know the infection status, the top screen shows the infection status of Decadeca and all over Japan.

The reload button on the upper left updates the infection status. The upper right is the chat button, which transitions to the chat screen, The buttons below also transition to the screen according to each name.

For the color scheme, I made a color list in advance and tried to make the color scheme uniform. While rotating the coronavirus icon by animation It is designed to move from outside the screen to inside the screen.

Chat screen

スクリーンショット 2020-11-05 10.57.08.png This is an idea implementation. It was created assuming that users who are uncertain whether they are infected can chat directly with a doctor. I'm using a library called MessageKit. Of course, it works with Firestore.

Health check screen

スクリーンショット 2020-11-05 10.57.26.png This is also an idea implementation. We pick up typical corona symptoms and distinguish points by severity. When you press the diagnosis completion button, the diagnosis result will be displayed as an alert according to the total points. The diagnosis result of the day is saved and displayed on the calendar.

Health Exam Screen-Diagnosis Result Alert

スクリーンショット 2020-11-05 10.57.40.png This is a diagnostic result alert. Since it is virtual, there is no basis. It's just an idea implementation.

Infection Status-Bar Chart

スクリーンショット 2020-11-05 10.57.52.png You can check the infection status of each prefecture. You can check the number of infected people, PCR number, and death number by operating the segment control. In addition, you can display the status of a specific prefecture in the content below by searching.

Infection Status-Pie Chart

スクリーンショット 2020-11-05 10.58.03.png You can check the top 5 infection status in each prefecture. By operating the segment control, you can check the number of infected people, the number of PCRs, and the number of deaths in the Top 5. In addition, you can display the status of a specific prefecture in the content below by searching.

Library used

  pod 'RealmSwift'
  pod 'Alamofire'
  pod 'SwiftyJSON'
  pod 'FSCalendar'
  pod 'CalculateCalendarLogic'
  pod 'Charts'
  pod 'KRProgressHUD'
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
  pod 'FirebaseFirestoreSwift'
  pod 'MessageKit'
  pod 'MessageInputBar'
  pod 'Moya/RxSwift', '~> 13.0'
  pod 'RxSwift', '~> 4.0'
  pod 'RxCocoa', '~> 4.0'
  pod 'RxDataSources', '~> 3.1.0'
//Not used partly

in conclusion

What did you think I hope it will be a reference for creating apps.

Recommended Posts

[Swift] Lightly introduce the logic of the app that passed the selection
[Swift] API used for apps that passed the selection
Extension that asynchronously executes closures passed to the initializer of Combine.Future
[Swift] Change the textColor of UIDatePicker
The basic basis of Swift dialogs
This and that of the JDK
[Swift] I investigated the variable expansion "\ ()" that realizes the mysterious function of Swift UI.
This and that of Swift corner Radius
[Swift] Vaguely grasp the flow of Delegate
[Swift] Termination of the program by assertion
[Swift] Get the height of Safe Area
[Swift] Elements that make up the protocol
[Swift] Change the color of SCN Node
The basic basis of Swift custom cells
The strongest Omikuji app that only I, an EKS Lover, can think of