Sign in

Senior iOS developer👨🏻‍💻
Few Screenshots from the App

I have started learning SwiftUI during the pandemic lockdown. SwiftUI was comparatively easy and challenging for me due to its declarative nature of development. Initially, I have concentrated on the fundamentals of SwiftUI and spent more time playing with the learned concepts in Xcode.

I was developing the app in private for my personal use. Later, I have decided to…


Add awesome widgets to your iOS 14 application

Image of iOS tablets.
Image of iOS tablets.
Photo by Miguel Tomás on Unsplash

I know that I’m late to the party 😅. Probably you might have heard what are widgets in iOS 14 and their use cases. I have started developing an app for personal use using SwiftUI to track my workout progress. I have started it as learning, and later I have added more features because I use the app on a daily basis.


Loading indicators and progress bars just got a whole lot better

Photo by Yingchih on Unsplash

Apple has released major updates to the SwiftUI framework at WWDC20. We might need to show visual feedback to the user about what’s happening and the progress of the tasks like uploading or downloading a file or fetching data from the server. Earlier we were depending on UIViewRepresentable to import and use UIActivityIndicatorView from UIKit in SwiftUI or on custom implementation using solid shapes.

  • Indeterminate: To show whether the process is happening
  • Determinate: To show the percentage…


How to design neumorphic buttons

Neumorphism effect using SwiftUI (Image courtesy of the author)

I was looking for the latest UI and UX design trends in dribble, and I heard of a concept often called neumorphism.


Beautiful loading states

Creating an intuitive animation is very simple and efficient in Apple’s brand new framework, SwiftUI. Before getting started, check out the video below to get to know what we are about to discuss.

Animations

In the above video, you saw five simple activity animations using different inbuilt solid shapes in SwiftUI.

  1. Opacity
  2. Offset
  3. Scale
  4. Frame
  5. etc…

You should apply any one of the animatable properties to your view to get an animation effect using the .animation()


You might have declared static properties or functions in your type (class or structs) to organize the type-specific data for better readability.

Everything in…


@State, @Published, @EnvironmentObject, and more

Photo by Tim Gouw on Unsplash.

SwiftUI has a number of property wrappers for different purposes to make developers’ lives easier. I would like to share some notes about these wrappers. Let’s get started.

@State

  • We can modify the value of the struct by using this struct as a value type.
  • This is meant to store simple types like String, Int, Bool, etc.
  • We need to use this inside a view and it’s recommended to make it private.
  • We should provide a default value.
  • It can be used as a binding.

@ObservedObject

  • We can use this when we want to pass a complex object between views, and…


Add your phone’s photos to your SwiftUI app

SwiftUI is a wonderful announcement from WWDC19. As SwiftUI is a framework that is less than one year old, we don’t have rich declarative APIs for a lot of basic needs like picking an image from the photo library or camera, maps, etc.

  • The UIViewRepresentable protocol is used to integrate UIKit views with SwiftUI.
  • The UIViewControllerRepresentable protocol is used…


The missing manual

UIKit developers may have heard of the term View Life Cycle methods. Okay, if you are a UIKit developer, let me ask a few questions before we dig into the topic.


Xcode 11.4 simulator

Apple keeps on adding changes to the Xcode and simulators to make development ease. The changes might be something major like push notification support in the simulator or minor like capturing a screenshot.

Save screen:

Saves screenshot in Mac

You might have used Cmd + S in the simulator for saving the current frame buffer as a screenshot, which will be saved in your Desktop by default. Apple just renamed it as Save screen for better readability and usability.

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