ohmyswift

ohmyswift

Weekly articles about Swift and iOS development.


Customizing UIButton in iOS 15

24 Aug 2021 1 minute read 0 comments rizwanahmed

Buttons are an essential element in iOS apps. If you are developing an app using UIKit, you will probably use UIButton class to create buttons. Creating a button is a straightforward process, but it becomes problematic when it comes to customizations...

Simulating remote push notifications in an iOS simulator

28 May 2021 1 minute read 0 comments rizwanahmed

Apple released Xcode 11.4 beta with tons of features. One of the notable features is simulating remote push notifications in simulators, which means that triggering remote notifications in simulators is now possible. Requirements Well, the requiremen...

Common problems and workarounds while building apps using Apple Silicon

24 May 2021 5 minute read 0 comments rizwanahmed

Apple’s new Apple Silicon (M1 processor) is a beast. The apps open pretty quickly, and the slow Xcode build times are a thing of the past. But what does it have in store for the iOS/macOS developers? When you try to run your existing projects on Appl...

Swap keys and values of a Dictionary in Swift

24 May 2021 1 minute read 0 comments rizwanahmed

Dictionaries are one of the most commonly used data structures. Dictionaries come with keys and values where the keys are unique. Sometimes, there might be a situation where we would want to swap the keys and values of a dictionary. Let’s see how to...

Replacing Selectors with Closures in UIButton

10 May 2021 1 minute read 0 comments rizwanahmed

iOS 14.0 brings us many improvements and new APIs using which the developers can write efficient code. One such API is the closure based action API instead of the addTarget method in UIControls. Yes, you heard me right—no more usage of addTarget meth...