Text macros are symbols that are expanded in-place to the specified text. They are used in files and other places in Xcode, such as the header text for a new file or the project name. You can customize existing macros and add your own macros in a project, for all users of a project, or for all of Xcode. Customizing a macro requires two things:
In object-oriented programming languages, access control is a part of the apparatus of achieving encapsulation, one of four fundamentals of object-oriented programming. The goal is to establish a clear separation between interface (visible and accessible parts of the class) and implementation (internal representation and helper methods). - Wikipedia
Open a Swift 3 project in Xcode 9 and it will warn you that you can upgrade to Swift 4. If you accept the invite you end up with another warning that Swift 4 mode deprecates the Swift 3
@objc inference rules. What is this scary sounding warning and how do you make it go away?
didSet of a property don’t called during init, so we can use
defer to fix that issue.
In this article we are going to convert UTC Date format to Current device date format.
UTC is the time standard commonly used across the world. The world’s timing centers have agreed to keep their time scales closely synchronized - or coordinated - therefore the name Coordinated Universal Time.
As one of the most powerful features in Swift, Generics can be tricky. A lot of people have trouble understanding and using them, especially application developers. Generics are most suitable for libraries, frameworks, and SDKs. In this post, I’ll try something different than other tutorials. We’ll open a restaurant and get a permission from SwiftyCity City Council. For the sake of integrity, I’ll try to keep things under four subjects.
When Swift debuted, we said goodbye to using
#pragma pre-processor definitions to organize our code. Don’t worry, Xcode still has our backs. We can use a few different “special” comments in our code and Xcode will pick up on them and display them in its jump bar: