I started implementing an AVPlayer with standard capabilities. The user can play, pause, and drag the slider (implemented with an
UISlider) to seek a point in the video.
While dragging, the player will stop updating the slider with the current progress derived from
player.currentTime() / player.duration. Usually, this is done by setting up an observer with
slider.value will be used to calculate and reflect the progress pointed by the user’s dragging. Once the user releases the slider, we use
player.seek() to continue playing the video from the time converted from
On the slider…
We should all be familiar with the action sheet that iOS uses in the system settings and Apple native apps:
The time zone localization tips missing from Apple’s official documentation
I came across a requirement from the product team earlier today where they want to display a UTC date in the format:
April 30th, 2021 (Vancouver Time), and it should be localized to the device’s active locale.
After some research, it is clear that the Foundation framework already comes equipped with the common operations you would do with time zones.
According to Apple’s documentation, you would use a
TimeZone to :
TimeZonedefines the behavior of a time zone. Time zone values represent geopolitical regions. Consequently, these values have names…
I don’t need to have expert knowledge in user experience to realize that users don’t like to be left in ambiguity. Users require an immediate and clear visual indicator of the current state of the product they are using. In real life, when there is nothing on the table, we leave it tiny like that. But in an app, we want to show some custom content when the table view is empty to tell the user about that.
If you work in a team with designers, it is their responsibility to give you, the developer, instructions on what to display…
When I first started writing Swift (beginning of 2019), it was very obvious that Alamofire made making API calls a lot simpler than using the stock URLSession. I was basically copying code samples from Alamofire’s official documentation and pasting them verbatim into my code to modify bit by bit until they all compile and pass my manual testing.
It was not until a year later I began to realize there’s (always) a better way of writing the code, in this case, API requests with Alamofire. How I came to the realization? …
I read, write, work out, and try to stay hungry.