Adding a Custom Control
19 Feb 2015I wanted a nice graphical way of showing the progress of the days counted, so I had to make a custom control.
Luckily a couple of days ago I found a great article on how to do almost exactly what I needed.
After a few tweaks from the article code to expose some hard-coded values as properties, it didn’t take long to get something up and running. I’m not going to repeat the article details here, as it’s very clear.
The easiest way of sharing code between the main app and the today widget is to put the shared code in a separate library, which can then be linked to by both targets.
The main view of the app is now much better looking…
I also wanted to add the control to the today widget, which looks a lot better now too …
Next steps
Improve the UI of the settings view, and overall navigation between the views
Previous posts in the series
- Plan for DaysLeft App
- Baby Steps using Swift
- Porting UserSettings Code To Swift
- Basic UI in Swift
- Writing a Today Widget in Swift
The code for the project is also available on GitHub