Ahmed Khalaf
Ahmed Khalaf
(Originally published 2019-10-4) It's not uncommon for the back-end guys to return some JSON where the type of a field is *either* a number or a string. This causes inconvenience...
(Originally published 2019-09-13) Did you ever forget to set `translatesAutoresizingMaskIntoConstraints` to `false` before adding constraints to a view created in code, and wasted much time in debugging? You are not...
(Originally published 2019-08-30) It's not uncommon to see a variable in some codebase that looks like this: ```swift var isAlertShown: Bool ``` Or: ```swift var pageIndex: Int ``` Such variables...
(Originally published 2019-07-12) ## Asset Catalog We use [Asset Catalog](https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/index.html) to store images we use inside our apps. If you're not using it, you should. It's not just a fancy...
(Originally published 2019-03-23) One of the first lessons we learn in iOS development is that UIKit classes (`UILabel`, `UIImageView`, ...etc) shouldn't be touched outside the main thread. Sometimes we learn...
(Originally published 2019-01-19) ## Introduction There are at least three ways of paginating content in iOS. Namely, via `UIScrollView`, `UIPageViewController`, and `UICollectionView`. For simplicity, I'll consider only horizontal pagination from...
(Originally published 2018-08-10) This was originally an answer I wrote in [our local iOS Developers in Egypt Facebook group](https://web.facebook.com/groups/356582147768070). --- Sometimes you want to make an Arabic-only app. Or you...
(Originally published 2018-06-15) ## Background Compiler optimizations are disabled by default in Debug mode. This is to enable a sane debug experience by avoiding omitted variables (or even whole blocks...
(Originally published 2017-12-15) While you can make your app support multiple languages, still there's no easy (and documented) way to dynamically change the app's localisation. You either let the user...
(Originally published 2017-11-03) `UIWebView` had a helpful property named `paginationMode`. It gave you horizontal pagination out of the box; specifically using the values: `leftToRight`, and `rightToLeft`. However, `UIWebView` is going...