img

Software Development Blog

Generic in Swift. Real examples and use cases in real projects

Generic in Swift. Real examples and use cases in real projects

Generic code enables us to write flexible, reusable code. It helps us to avoid duplication and take our code consistent and more universal. I like statically typed languages like Swift because you need to understand where and how to use generics. In dynamically typed languages like PHP or Python, all functions work like generic code […]

READ MORE

Show the direction of travel on the map in the iOS App. Google Maps.

Show the direction of travel on the map in the iOS App. Google Maps.

Taxi or travel apps always need to show the direction of travel on the map. In these quick tutorials, I will show you how to set up, show, and test the directional marker on the maps. Completed tutorial on Github here So, at first, we need these keys in info.plist file. These settings will allow […]

READ MORE

Nested Functions in Swift. Real experience

Nested Functions in Swift. Real experience

I want to give you a clear understanding of nested functions and share my experience in using nested functions in Swift. Theoretical Part Swift Functions can have nested functions inside their bodies. Nested functions must be defined before the body of their master function. Nested functions are accessible only in their master function. (Only inside […]

READ MORE

UIAlertController Tutorial

UIAlertController Tutorial

UIAlertController is a subclass of UIViewController. It is an object that displays an interactive alert message. It can have actions and textFields. UIAlertController is very useful because you don’t need to code this simple alerts again and again (It is a pre-styled controller), and because it is very intuitive to IOS users. 1.UIAlertController Styles: UIAlertController […]

READ MORE

How to solve the masksToBounds problem with the shadow of UIView?

How to solve the masksToBounds problem with the shadow of UIView?

Github project In the previous post, I showed how to add different properties like a shadow, border, image, cornerRadius to CALayer. All layers have masksToBounds property. If masksToBounds = true – It will clip all layers that are bigger than their superlayer. And this is a useful property. As we know the shadow is an […]

READ MORE

Quickstart with CALayer and CABasicAnimation

Quickstart with CALayer and CABasicAnimation

What is CALayer? CALayer is an object from the Core Animation framework. Each UIView backed by CALayer class, and you can easily find it in view.layer property. This class helps us to modify views and animate them. Basically, you animate a layer of view, but UIView size, position, etc depend on the layer property. So, […]

READ MORE

How to save time with Xcode snippets?

How to save time with Xcode snippets?

Do you feel that you are sometimes needed to create the same parts of code? Code snippets can easily help you. For example, we need to create a Singleton class. 1. Create a code that you want to reuse. 2. Highlight Singleton code and press Editor -> Create Code Snippet. 3. Name it and write […]

READ MORE

How to open a web site or phone from my iOS Swift app?

How to open a web site or phone from my iOS Swift app?

How to open a web site? Like on the code above, you just need to create a non-optional URL to a needed website (google.com for example), with function canOpenURL(url) check if your application can open this resource. If canOpenURL(url) returns true – you can call the open function with your URL. (If a website, which […]

READ MORE

How R.swift can save your project’s time?

How R.swift can save your project’s time?

iOS swift project gives you a dozen of ways to share your color, fonts, configs. I started my iOS career a few years ago and as an average programmer, I want to share some global data and I wrote my custom stuff for this. It is not a problem, to create a custom manager for […]

READ MORE

UIKit, Info.plist file

UIKit, Info.plist file

UIKit is a framework for creating iOS and tvOS apps user interfaces. It is very important to know UIKit right now because SwiftUI (the new way in interface creating) is still young and only supports iOS 13 version and higher. So the next 2 to 4 years, UIKit will be must-know technology in native iOS […]

READ MORE