In this post, we will be making a simple UITableView implementation using RxSwift and RxCocoa. No complex patterns to confuse you, the idea is to understand one thing at a time.
Most of the time there is confusion about various content modes. I would like to clarify all 13 of them in this post. There are 13 content modes as listed below Scale To Fill Aspect Fit Aspect Fill Redraw Center Top Bottom Left Right Top Left Top Right Bottom Left Bottom Right Now I would … Read more
I remember when I first tried using the colour directly from photoshop into my project the colours were appearing whitish while it was yellowish in photoshop the colour value was Color-R-160, G-97, B-5. though very basic but somehow I could not take into account that I need to give a value between 0 and 1.0. … Read more
Hey there!! The agenda of this post is to get you on the speed with SwiftUI and I have chosen the most versatile UI component in iOS app world the UITableView. Today we will be making a UITableView with a custom cell and I will try to keep it as simple as possible.Let’s begin Creating … Read more
Previously in order to set selected segment color in UISegmentControl we needed to loop through subviews and set the right one like this imagine the uncertainties 😀 But since Xcode 11+ we can directly set selected tint in storyboard like this. In iops 13 + we can also use selectedSegmentTintColor. Makes life easy.
Using a broad type allows us to keep our code modular and manageable. It allows us to extend functionality at will. But at times we need to go specific to use the functionality specific to a particular type. In swift, we use inheritance and protocol as broad types as shown below As you can see … Read more
We get location objects in CLLocationManager’s The issue however is it also gives us some CLLocation objects which are low quality. Since plotting low-quality CLLocation or using them can lead to a bad user experience. We can solve this by using the following properties of CLLocation object horizontalAccuracy verticalAccuracy timestamp All the accuracy properties are … Read more
There are flows in your app where you want to return to the very beginning of the application. It can be due to session expiry or end of flow in a linear activity like filling multipage forms or any other scenario. You want to come back to the beginning of the app. This can be … Read more
To get the topmost view controller in Swift you need to take into account the presented viewcontrollers. This can be achieved in the following ways You also need to take into account iOS 13 + versions Happy coding !!!
There are situations where we need to use the UIProgressView as a count-down bar. We want to count it from 1 to 0. There are two ways in which this can be achieved. Flipping the UIProgressView This is the old solution that can be used if you are supporting below iOS 9.0. In this method, … Read more