Open in app

Sign In

Write

Sign In

Besher Al Maleh
Besher Al Maleh

487 Followers

Home

About

Mar 12, 2020

The Nested Closure Trap

Suppose we have code that executes an animation closure nested inside a Dispatch Work Item. Here are 3 versions of this code. Can you tell which one introduces a retain cycle? (click for mobile-friendly gist)

I OS

3 min read

The Nested Closure Trap
The Nested Closure Trap
I OS

3 min read


Jan 29, 2020

Concurrency Visualized — Part 3: Pitfalls and Conclusion

This is part 3 of my concurrency series. Check out Part 1 and Part 2 if you missed them. In my earlier discussion of sync, async, serial, and concurrent, I alluded to some pitfalls that you might encounter while working with concurrency. That’s our main topic for this article. …

I OS

8 min read

Concurrency Visualized — Part 3: Pitfalls and Conclusion
Concurrency Visualized — Part 3: Pitfalls and Conclusion
I OS

8 min read


Jan 29, 2020

Concurrency Visualized — Part 2: Serial vs Concurrent

This is part 2 of my concurrency series. If you missed part 1, check it out here. In part 1, we explored the differences between synchronous and asynchronous execution when dispatching tasks using GCD. Now, we’re going to focus on what happens in the queue after you dispatch your task. Serial vs Concurrent …

I OS

5 min read

Concurrency Visualized — Part 2: Serial vs Concurrent
Concurrency Visualized — Part 2: Serial vs Concurrent
I OS

5 min read


Jan 29, 2020

Concurrency Visualized — Part 1: Sync vs Async

Throughout this concurrency series, I am going to cover the different types of queues in Grand Central Dispatch (GCD.) More specifically, I will explore the differences between serial and concurrent queues, as well as the differences between synchronous and asynchronous execution. If you’ve never used GCD before, this series is…

I OS

10 min read

Concurrency Visualized — Part 1: Sync vs Async
Concurrency Visualized — Part 1: Sync vs Async
I OS

10 min read


Sep 16, 2019

Fireworks — A visual particles editor for Swift

I OS

4 min read

Fireworks — A visual particles editor for Swift
Fireworks — A visual particles editor for Swift
I OS

4 min read


Jun 17, 2019

You don’t (always) need [weak self]

Cycles… no, not the fun kind shown above. I mean strong reference cycles, the kind that causes entire view controllers to leak in your iOS app. More specifically, I want to talk about the use of [weak self] inside of Swift closures to avoid reference (or retain) cycles, and explore…

I OS

13 min read

You don’t (always) need [weak self]
You don’t (always) need [weak self]
I OS

13 min read


Mar 27, 2019

My first Swift project

In my earlier posts, I mentioned how personal projects helped me stay motivated while I was learning programming. In this post I will talk about the first personal project that I built back in 2017, covering all steps from idea to final version. I covered the purpose of this project…

Microsoft

8 min read

My first Swift project
My first Swift project
Microsoft

8 min read


Jan 19, 2019

High performance drawing on iOS — Part 2

In Part 1 I discussed two different ways to perform 2D drawing on iOS, both of which are CPU-based. The first one performed ok on the iPhone but very poorly on the iPad (17 fps average), while the second one delivered great performance and only incurred about 25% CPU utilization…

I OS

7 min read

High performance drawing on iOS — Part 2
High performance drawing on iOS — Part 2
I OS

7 min read


Jan 17, 2019

High performance drawing on iOS — Part 1

As I was building my recently released drawing game, I explored different ways to perform 2D drawing on iOS. Throughout this 2-part series, I will share what I’ve learned by comparing the performance of 4 distinct ways to draw on the platform. …

Apple

8 min read

High performance drawing on iOS  — Part 1
High performance drawing on iOS  — Part 1
Apple

8 min read


Nov 1, 2018

How I built my first open source library

Last week I published my first open source library, QuickTicker. It’s a Swift library that lets you create simple ticker animations using one line of code. The result looks like this:

Swift

14 min read

How I built my first open source library
How I built my first open source library
Swift

14 min read

Besher Al Maleh

Besher Al Maleh

487 Followers

Self-taught iOS developer interested in all things iOS www.besher.ca

Following
  • Geoff Hackworth

    Geoff Hackworth

  • Michael Eisel

    Michael Eisel

  • Alberto Taiuti

    Alberto Taiuti

  • Matt Stanford

    Matt Stanford

  • Andrés Mijares

    Andrés Mijares

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech