PrivateFrameworks are always a joy.
Today, for a personal project I discovered how to use private Login.framework to lock programmatically via code (Swift or C) the screen of my mac book.
Read MorePrivateFrameworks are always a joy.
Today, for a personal project I discovered how to use private Login.framework to lock programmatically via code (Swift or C) the screen of my mac book.
Read MoreStarting from iOS 11, Apple introduces a new framework called Vision.
The Vision framework performs face and face landmark detection, text detection, barcode recognition, image registration, and general feature tracking. Vision also allows the use of custom Core ML models for tasks like classification or object detection.
https://developer.apple.com/documentation/vision
Today we implement with few lines of code one of the simplest features of this beautiful framework, the OCR reader.
Read MoreRotate a UIImageView using Gyroscope:
Read MoreVery often you should insert a pin-code in a UITextField that some service in order to verify your identity sends you via SMS (generally for a 2FA, two-factor authentication).
Read MoreWith the NetworkExtension framework, you can customize and extend the core networking features of iOS and macOS. Specifically, you can:
The NetworkExtension framework is available in macOS and iOS, but not all features are available on both platforms and some features have specific restrictions (for example, some features only work on supervised iOS devices). The documentation for each feature describes these restrictions.
Apple offer the batteryState in the UIDevice class:
In iOS12 Apple introduced a new way to check if your device is in “flat” mode, or better is on your desk.
Let’s take a look at the reference:
Hi!
with iOS 12, Apple released a new framework for language recognition and other interesting stuff. Is called NLLanguageRecognizer.
Use the Natural Language framework to perform tasks like language and script identification, tokenization, lemmatization, parts-of-speech tagging, and named entity recognition. You can also use this framework with Create ML to train and deploy custom natural language models.
Classes, structures, and enumerations can define subscripts, which are shortcuts for accessing the member elements of a collection, list, or sequence. You use subscripts to set and retrieve values by index without needing separate methods for setting and retrieval. For example, you access elements in an
Array
instance assomeArray[index]
and elements in aDictionary
instance assomeDictionary[key]
.You can define multiple subscripts for a single type, and the appropriate subscript overload to use is selected based on the type of index value you pass to the subscript. Subscripts are not limited to a single dimension, and you can define subscripts with multiple input parameters to suit your custom type’s needs.
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: