Home
Abedalkareem Omreyh
Cancel

What is DispatchGroup and how to use it

DispatchGroup All of us ran into case where you need to wait for multiple works to finish to do something, maybe downloading models from multiple APIs then group them, or do a group of API calls a...

What is DispatchSemaphore and how to use it

DispatchSemaphore Have you ever ran into issue where you want a code to be accessed by one thread at a time? DispatchSemaphore give you this abilty in vary clean way! Example Imagen that you have...

What is DispatchWorkItem and how to use it

DispatchWorkItem Creating a DispatchWorkItem You can use DispatchWorkItem to create a work to be performed on a dispatch queue. let workItem = DispatchWorkItem { print("I'm doing some work") } ...

What is Dispatch queues and how to use them

DispatchQueue A class that manage the tasks execution serially or concurrently on your app’s main thread or on a background thread. Serial queue vs Concurrent queue Serial queue Serial queue perf...

How to use SKEmitterNode programatically

Lately, I was developing a game for the AppleTV and WatchOS, and while doing that, I was looking for a way to create the SKEmitterNode programmatically. Surprisingly that was hard! The main...

What is @objcMembers and @objc in Swift

If you tried to use Swift code in Objective-C and you were not able to create an object from a class or to call a swift method, that’s most probably because you didn’t add the @objc to the ...

What is @main in Swift

In all programs you always have an entry point, a place where your app should start from, and swift is not an exception to that. If you remember the very old days we where having main.m as ...

Game center Access point

This year apple has done a really good updates to the Game Center to make it look better and modern, One of the good changes is the new Access point where the user will have an access point...

Imperative Vs Declarative Programming in Swift

When SwiftUI came out, I start hearing about that it’s declarative, even if you went to the SwiftUI website you will find that they are saying one of the SwiftUI features that it has a decl...

A SwiftUI Tour

SwiftUI is a new way to build your UI in easy and faster way. with less code and apple cross platform views. Why to use -SwiftUI redraw your view when you change the state of your view so ...