Consultation/Contract Work — contact@rudrankriyam.com
Image for post
Image for post
Photo by Przemyslaw Marczynski on Unsplash

I’ve been using SwiftUI for a while and recently worked on a watchOS app where I also tried to make it accessible.

When I first started on the app, I forgot to add accessibility labels for the system images, and I found it later while auditing it in the Accessibility Inspector.

SwiftUI doesn’t provide any initializer for Image to have the label as a parameter nor something to ignore it for accessibility purposes. So let’s create one!

SF Symbols with Accessibility Label

I wasn’t sure what to name my custom view because AccessibilityImage seemed too long, while A11YImage didn’t sound ideal. …


Unique experience for iPhone, iPad and Mac

Image for post
Image for post
TabView in Gradient Game.

Today I sat down to create a sidebar on Gradient Game for iPadOS 14 and the upcoming macOS Big Sur.

My main concern was passing the same data model for both TabView on iOS devices and SidebarView on iPadOS & macOS.

Sharing some simplified code snippets for the same.

Data Model

The data for an individual tab should consist of its title, the name of the SF Symbol, and the destination View. Also, I want a function that would return an array of this data.

With this, if I’ve to add a new tab or update/remove the existing ones, I just have to edit the views variable, and it should update for both tab and sidebar. …


Starting 2020 with a rejection.

Image for post
Image for post
Photo by Nik MacMillan on Unsplash

It was my first ever technical phone interview for the role of a software engineering internship. That too scheduled with Apple, Cupertino.

The first round was scheduled a few days after my fifth-semester exams. For that, I was doing LeetCode day and night and got the subscription to only focus on questions from Apple. I cleared the first coding round, which was a question similar to a level of LeetCode Medium.

A few hours later, I got the confirmation that I would proceed to the second and the final round. At this point, I had done hundreds of LeetCode easy and few dozes of LeetCode medium. …


Documenting the process of creating the submission project

Screen at WWDC 2019
Screen at WWDC 2019
WWDC 2019

June 4, 2018

I remember going through the WWDC website to watch the keynote on my MacBook Air.

I wished I could watch it live someday. So, during the intro music, I started exploring the site to understand how the developers get a ticket for it. It was $1,600 for a developer, based on a lottery system. Ummm, no. I scrolled down and found this on the homepage.

Scholarships — Students and STEM organization members can apply to receive a conference ticket, lodging, and one year of membership in the Apple Developer Program.”

Ahh, this is what I am looking for!

But now I would have to wait for a year to apply. I went through the requirements, a full project on Xcode Playgrounds/Swift Playgrounds with some essays. I had just started iOS Development, and my experience with Playgrounds was limited to declaring a few variables. And only 350 students were selected from all over the world, ranging from school students to PhDs. This seemed difficult, and so I gave up. …


Create empowering widgets for your users

Image of an iPhone consisting of Music, Photos and Batteries widgets.
Image of an iPhone consisting of Music, Photos and Batteries widgets.
Photo by Omid Armin on Unsplash

Introduction

This summer, Apple announced widgets for iOS 14 that you can have on your home screen alongside your existing apps. Widgets help you to personalise the screen with glanceable relevant data upfront.

This article covers the foundational adaptation of creating a good VoiceOver, Voice Control, and adaptive display experience with your widgets using SwiftUI.

Accessibility in SwiftUI

It’s refreshing to see how easy it is to make your application accessible using SwiftUI. Adding an accessibility label to a settings icon is as simple as:

.accessibilityLabel(“Settings“)

Developers can take advantage of the straightforward APIs and implement these in their apps.

And also widgets.

So let’s look at some of the topics of accessibility and how you can implement them in your widgets! …


These libraries can help you fill the void in your next SwiftUI-powered iOS application

Image for post
Image for post
Photo by Jefferson Santos on Unsplash

This is the second part of my article 8 Amazing SwiftUI Libraries to Use in Your Next Project, which I wrote after getting a substantial response on the first.

If you have started working with SwiftUI or using it for your hobby projects, these six libraries can help you step up your game.

Most of the libraries are available via Swift Package Manager.

1. StepperView by Badarinath

StepperView is a SwiftUI iOS component for step indications.

Image for post
Image for post


A simple project to showcase the LazyVGrid and LazyHGrid layouts that were announced at WWDC 2020

Image for post
Image for post
Mockup generated by https://smartmockups.com

LazyVGrid and LazyHGrid layouts in SwiftUI were recently announced during WWDC 2020, and I’m so excited to share with you a simple tutorial to get you started with them!

Here’s the demo project to start with.

Note: Using these APIs requires macOS 10.14.5+ and Xcode 12+.

When you open the project, explore the 18 pleasing landscapes in Assets.xcassets, named as noaa[number] for the sake of simplicity. Shoutout to the National Oceanic and Atmospheric Administration (NOAA) for such beautiful pictures.

LazyVGrid

From the latest documentation, a LazyVGrid is a “container view that arranges its child views in a grid that grows vertically, creating items only as needed.” …


Whether you’re just learning SwiftUI or you’d like some codebases to explore, these projects can help you out

Image for post
Image for post
Photo by Ales Nesetril on Unsplash

This is the second part of my article “7 Awesome Open Source SwiftUI Projects To Inspire You,” which I wrote after getting a substantial response on the first.

If you’ve started working with open source or using it for your hobby projects, here are seven amazing projects to take inspiration from.

1. Animal Crossing New Horizon by Thomas Ricouard

This is a full-featured Animal Crossing helper application entirely in SwiftUI.

Promo image consisting of screenshot of iPhone, iPad and Mac version of the app
Promo image consisting of screenshot of iPhone, iPad and Mac version of the app

Features

  • Dashboard to track your fishes, bugs, collection progress, and active events
  • See the active critters this month and catch em all!
  • Turnips price tracking and predictions with daily push notifications
  • Turnip.exchange integration
  • Nookazon integration
  • Full catalog browser with filter, sorting, and…


SWIFT FUNDAMENTALS WITH PROBLEM SOLVING

Today I covered the topics based on the chapter — Basic Operators from the Swift Documentation.

Image for post
Image for post

Basic Operators

I have been using the basic operators since high school in C++. So, I won’t discuss what is already in the documentation, rather focus on the implementation of few of the operators.

Terminology

Operators can be classified into three type, unary, binary, or ternary —

  • Unary — Single target
!stack.isEmpty { // perform some action }
  • Binary — Two targets
carryOver = sum % 10
  • Ternary — Three targets
(number > 0) ? number : 0

Assignment Operator

We are aware that the assignment operator is used to assign (initialize or update) values. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store