Build a beautiful slideshow in your app

Drawing of a slideshow in Swift
Drawing of a slideshow in Swift
Photo by the author.

Wrapping up multiple images in a single horizontal slideshow is a common task while developing iOS apps. Don’t think of it as the same old slider that you can see on webpages. Slideshows can be more common and useful than you might think.


Slideshows are useful for feed content like posts, contests, carousels (not real carousels but similar ones), and way more. I’ve used slideshows in a great variety of iOS apps, and they’ve always helped me when I needed to show multiple images inside small views.

Moreover, you can apply user interactions to them easily with gesture recognizers, providing the swipe behavior to show next and previous items inside the container and even tap or long-press gestures to apply events. …

Is this the end of the hybrid app era?

Image for post
Image for post
Photo by Vojtech Bruzek on Unsplash.

I’ve been an active IT and programming trainer and teacher for more than 15 years… and a lot has changed during this time. I still remember my first PhoneGap course that was conceived for an important software agency in Rome to reach the most popular goal of that era: developing mobile cross-platform apps using existing programming languages.

Is this goal becoming meaningless or impossible to reach today?

Changes Over the Years: Hybrid Apps, PWAs, and More

Even if it may sound weird, things are quite similar to when I developed my first app using Cordova/PhoneGap and jQuery mobile (yes!). Technology brought a lot of hardware innovation if you check smartphone and tablet capabilities, but if you look at the software engineering side, the only real advancement is that tools, programming languages, frameworks, stacks, IDEs, and everything connected to software development are just better. Way better. There wasn’t really a breakthrough in this scenario. …

Because sometimes you need to grab a random document from your database

Image for post
Image for post
Photo by Patrick Fore on Unsplash

It may sound weird. It may sound extreme. It may sounds unconventional. But extracting random documents from a MongoDB collection is actually a common behavior that sooner or later every programmer must be able to implement and reproduce.

First of All: Use Cases and Real Needs

After all, you really need to be able to randomize documents extraction.

Imagine a use case or an app where you have to randomize information to show, even with a basic algorithm and not necessarily purely casually. Apps show randomic or pseudorandomic data more often than you think to cycle content and to make them appear always fresh.

Instagram, itself, uses an approach not much different than that to select pictures to show in their Explore section. …

How to implement the Equatable protocol to customize your comparison result and behavior

Image for post
Image for post
Photo by The Creative Exchange on Unsplash.

As with any OOP language, there is a correct way to compare objects and clear up any confusion about the == and the === operators. In this brief guide, I’ll explain those operator semantics and how to implement the Equatable protocol to customize your comparison result and behavior.

The == Operator

In Swift, the equals operator has almost the same goal it has in other object-oriented programming languages: It compares objects by reference. First of all, keep in mind that the expected boolean depends on what kind of things you’re comparing. In Swift, variables can be value types or reference types. The first “family” of variables holds values, whereas the second holds memory references. So if you’re using objects instantiated by a class schema, the == operator compares references and not values. That’s why the == operator can’t do a “deep comparison” and you should never suppose or pretend that it compares all the values inside every object property. It does not. …

Seems like the Ivy engine still needs work—that’s why we probably won’t see Angular 9 until next year

Image for post
Image for post
Photo by Suganth on Unsplash

Angular 9 is a really long-awaited release. Even if Angular 8 was a very good release with lots of improvements, including a smarter lazy loaded modules system, a new and improved CLI to generate elements and projects faster (even with the Angular router built-in or SASS preprocessor on board), and a lot more. The ninth release of the framework has been generating a lot of interest.

This time we won’t have any major improvement on the developer side. I mean, we won’t be granted a new router, a new module or anything like that. Angular 9 focuses more on compilation and effectiveness. The new Ivy engine can be integrated into Angular 8 using the official guidelines provided: here’s the link. As you can see, Ivy is named to be the new generation compilation and rendering pipeline, meaning it will be responsible not only for the compilation phase but also of the running phase, the rendering, and the framework context in its entirety. …

Let’s take a look at these libraries, improving your app’s UX and making it more fun

Image for post
Image for post
Photo by Aaron Burden on Unsplash

When you look back to 2007 or so, when iOS and the iPhone were released, apps were all the same: same UI interfaces, same behaviors, same features; the App store was just a big container of calculators, utility apps, and stuff like that. Today, more than 10 years later, everything has changed.

Apps need a very cool and sexy UI, modern colors, gradients, and, most of the time, even a very dedicated way to use it that’ll distinguish your product from the mass. Within a market of millions of apps, your app needs to be something new to break down your competitors. …

Believe it or not, this version is considered faulty. An update to the 11.2.1 GM is mandatory

Image for post
Image for post
Photo by Benjaminrobyn Jespersen on Unsplash

The 11th version of Xcode has been released to support iOS 13 development. There are a lot of new features in there like dark mode support, new assistant split-view editor, image preview support (finally), even a mini side-menu showing a code navigator…

But, there’s a couple of fallbacks driving developers totally mad.

The First Problem

I personally found Xcode 11 stable, nice, and a bit faster than previous versions. I really love all the new features, including the new dark UI in Xcode itself, but as soon as I started my daily iOS coding activity, I started noticing something weird.

After having disabled the dark UI on my apps (I wanted them light) and migrating everything to the new Swift 5.1, I started figuring out weird behaviors on auto-layout implementations. …

What if you don’t want dark mode?

Image for post
Image for post
Photo by William Carlson on Unsplash

Since Apple’s release of its new SDK and the eleventh release of Xcode, apps are encouraged to support the new iOS 13 dark mode. But what if we don’t want to use it?

If you run a project you were developing for iOS 12, your app will simply show dark UIViews on iOS 13, causing your labels to not be displayed correctly and ruining your light-mode conception of how your UI should appear.

There are a couple of ways to disable dark mode, which we’ll cover below.

1. Setting UIUserInterfaceStyle in Your Info.plist

The easiest way to force your app to show light interfaces is setting the UIUserInterfaceStyle in the Info.plist, …

All the key features in the new version

Image for post
Image for post

Apple has finally released the brand new IDE for iOS, MacOS and iPadOS developers: Xcode 11. I have to admit, it looks pretty good, more like a stable development environment than before. If you’ve been a developer for a while you surely know that otherwise very good past releases suffered from crashes, bad support, and poor documentation references, code scaffolding, and completion. The simulator itself performed very badly on some occasions. XCode 11 is a great release, but it suffers some compilation problems and weird behaviors due to the new SDK and the support of SwiftUI.

The Features

The new Xcode comes with a new dark interface, following the latest trend, as well as look-and-feel integration with the new Catalina MacOS, which is dark by default. In the past, I’d always been a fan of light interfaces, but I’ve recently come to prefer the dark UI. Dark UIs were originally introduced to optimize battery life on mobile devices, so it would seem like something we don’t really need on desktop. But there it is, and if you like it you can keep it. Personally, I like the new code appearance, fonts, and colors, so I haven’t changed the default settings. …

Level up your mobile game today

Image for post
Image for post
Photo by Max Nelson on Unsplash

When making iOS products there are some some key factors that make code more readable, efficient and maintainable, which I always try to keep in mind. Swift is a modern programming language and it supports many concepts of modern programming, while remaining simple.

Here are the things you can’t forget if you want to make improve your Swift code.

1. Use Protocols

Protocols are a great way to do a lot of things in Swift. With protocols you can establish and design behaviours of software components, making them compliant to specific implementations. …


Ivano Di Gese

Passionate IT skills on the run: keep calm, do your stuff and code better

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store