Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.4, and Swift 5.3.2
* You will be expected to be aware how to make a Single View Application in Swift, or use Playgrounds to do the same
Dictionary: The association between keys and values (where all the keys are of the same type, and all values are of the same type)
Watch me explain this myself: https://youtu.be/-NUzHVXL-FQ
A Dictionary
is a struct
that provides fast access to the keys and values that it contains (great!)…
There are plenty of reasons to get into App development. You might start off making some Apps for yourself, or your friends. You might even make a few of these Apps for the store, and Monazite them to gain income.
But what if you want to go professional? That is, get a job.
If you ask some businesses what experience and skills they would like their junior developers to have, you might see some (perhaps all) of the following:
They…
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.4, and Swift 5.3.2
You can access a video version of this article @https://youtu.be/Szjjj4rWMIs
A simple problem that requires an article — now perhaps you want to lazy load images in a UITableView
; but how would you possibly do that?
Even more important — how can we use dependency injection for this?
You will be expected to be aware how to make a Single View Application in Swift.
You can use an extension for this, so we can call it straight after setting the image…
Taking an example project from LeetCode, I might try to find the answer for 1413. Minimum Value to Get Positive Step by Step Sum
.
Now I told a lie, in one of these articles. Specifically in my Playgrounds article I said I don’t use Playgrounds for LeetCode challenges because of the setup. I actually don’t use Playgrounds because sometimes they are slooow, or don’t seem to work for me when I first start a new Playground. I don’t know why, perhaps it’s because I’m using a 2016 MBP? …
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.4, and Swift 5.3.2
There are many reasons that you might wish to reduce the amount of code and complexity contained within any particular view controller.
One approach that you should have in your amoury is that of splitting a view controller into mutliple smaller ones — but we should be careful of HOW we do tht in order to avoid just moving code around and instead put code into more sensible homes.
this article, hopefully, can help you out
Difficulty: Beginner | Easy | Normal | Challenging
This article is paired with a YouTube video, that covers similar ground.
Auto Layout: A constraint-based layout system intrinsicContentSize: The natural size for the receiving view, considering only properties of the view itself
There aren’t any, although you will need to set up a project, although you might like to read through subclassing a UIView
Each view should have an idea amount of space that will display it’s content. For example a UILabel
has a width and height that is based on the size of the text it contains. …
I’ve often used creating a Command-line Mac OS application to complete LeetCode problems. This means that I’ve been able to use breakpoints in my answers and make sure that I’m thinking in a more strategic way.
But why don’t I use Playgrounds?
The main reason is understanding what setup is required. This article is here to explain how to setup playgrounds, and guide you through the process.
The supporting video is @ this link
In order to use testing in Playgrounds, we need to import XCTest
and create a class that conforms to the XCTestCase
protocol, and then run className.defaultTestSuite.run()
.
…
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.4, and Swift 5.3.2
This article has a supporting video at: YouTube video
You will almost certainly need to communicate with a backend through a published API. In fact, you might use an API like the Twitter API that is stable and well documented.
Now depending on why you are using an API, you might well have a date/time returned to…
If you are using closures in your Swift code, you may become familiar with the shorthand parameter syntax. That is, parameter names are often represented as $0
or $1
.
You may or may not be aware that these continue, in that for each parameter the shorthand name is incremented by one each time ($2
and $3
up to the number of arguments as is required in your code).
Rather than having to think of parameter names, and making our code less easy to read as a result you might use shorthand parameters. The emphasis is on the might.
Rather…
Photo by Raphael Lovaski on Unsplash
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.0, and Swift 5.3
This article has a supporting video at the following link:
SDWebImage
using Pods, you may need to install CocoaPods with sudo gem install cocoapods
and then perform a pod install
from inside the downloaded directory from the repo, if you decide…