Declan Conway

Web Developer

iOS Developer

Software Engineer

Declan Conway

Web Developer

iOS Developer

Software Engineer

Number Fact Generator

  • Status: Completed
  • Published : 19th October 2019
  • Platform: iOS
  • Language: Swift
Back to Works page

Introduction

Download Number Fact Generator app from the App Store here.

In this app, the user taps the generate button and a random fact about a number is generated. The user can also shake their device to generate a new fact and can then share that fact with their friends using the iOS share sheet.

The idea for this app came about while I was creating snippets of code for various iOS functions and features as a repository to consult during the development of an app. (My code snippets project can be found here). One snippet I was creating was how to parse a JSON feed. As I creating this snippet I realised that this could be a good foundation for a rudimentary iOS app. So I continued development with the goal of publishing on the App Store.

How was it built?

This app was created using Numbers API. In code, I am calling the JSON feed using the JSONDecoder library and then parsing that through a struct that inherits from the Codable protocol.

The app was built to support iOS 12 and iOS 13. These versions together run on 91% of all iOS devices. (As measured by the App Store on October 15, 2019.)

The gradient background was created using a CAGradientLayer (the CAGradientLayer is then assigned to a background view of type UIView) which shuffles through an array of pre set gradient colours. When the generate button is tapped or the device is shaken, an animation is called (CABasicAnimation) to show the next colour in the array.

Future Updates

Features to be added in future updates include:

  • Landscape orientation support
  • Updated share sheet text that includes app URL to app store listing
  • Native iPad support
  • Notifications
  • iOS 14 Widget

Gallery

Copyright © 2024, Declan Conway | Privacy Policy