Year: 2018
Swift – Chaining methods
Very often in Swift, you can see various methods called one each other and linked by a dot “.”.
These methods are called chained methods. Probably using Alamofire you already have seen this behaviour:
Swift | macOS – How to make cool desktop apps using Cocoa
So, what I want to share today is how to make windows with cool UI in a macOS application written in Cocoa/Swift.
This an example of what you see when create a new project from scratch in XCode and run it:
An engineer helping a designer
Swift – Use generics [T] with closures
Let’s make an example to understand better the scope of this tutorial.
You want to:
- increment all numbers in array by 1
- double all numbers in array
- check if the numbers in array are even or odd
- multiply all numbers in array
- more and more…
How many functions should you create to do this?
XCode – Add a file in project at build time
Imagine that you need to add a file in your XCode project the first time that you build the app.
For instance, you have a configuration file, in Swift, that you want to compile and embed in your app (instead of using a PLIST file that is in CLEAR…) during the build phase and of course use in your project.
HTTP Status codes
[Swift] Get devices model range
Here a simple and easy memo for getting the iPhones devices models range.
Swift – Calculate Levenshtein distance
Ciao,
here a conversion on an old tutorial in Swift about the Levenshtein distance of two strings.
Read MoreXCode ‐ Podfile with categories and multiple targets
Welcome back,
what I want to share is an ordered and readable Podfile.
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects.