This mechanism gives us a framework (and discipline) to pass data from one conroller to another.
Every controller conforms to DataReciever
protocol which means that it will have a property model
that can be set from the caller scope.
This mechanism gives us a framework (and discipline) to pass data from one conroller to another.
Every controller conforms to DataReciever
protocol which means that it will have a property model
that can be set from the caller scope.
Should be able to setup your first party dependencies (dynamic frameworks) and the updates must reflect without re-integrating the new .framework
repeatedly
cocoapod
, carthage
are great when you have third party or well-defined first party dependencies, without doubt.
But there will be instances when you don't want to create a git repository for a dependency or the dependency just sits in your project and you just want the.framework
file instead of subproject.
cocoapods
but don't want to create privatee repositoriesRecently, I came accross this excellent tool to validate and visualize Regular Expressions. I thought of implementing a small problem using regex and validate it from there.
REGEX: ^\s*\d*([.]\d+|\d+[.]|\d+[eE]\d+){0,1}\d*\s*$
func isNumber(_ s: String) -> Bool {
This is more than common use case where we access some data from dictionary defined as [String: Any?].
Most of the time we are aware of the data type in advance we allpy force cast (not me) or optional binding to finally access the data.
Consider you have a user object coming in as a Dictionary<String: Any>
and you have to access the gender.
Now this gender
could have {0, 1, 2}, {"m", "f", "o"} or {"male", "female", "other"}
An initializer in
String
classString(5, radix: 2)
creates a string which is a binary representation of 5 as :101
But it will not give a padded version (for obvious and good reasons) like00000101
or00000000 00000101
which may be desirable in some cases