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. …
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?
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. …
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.
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. …
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.
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. …
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. …
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. …
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.
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. …
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.
The easiest way to force your app to show light interfaces is setting the UIUserInterfaceStyle
in the Info.plist, …
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 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. …
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.
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. …
About