Part of being a great software developer is mastering your IDE. You will become more efficient in programming, just by knowing how your environment works. That's why I would like to dedicate some time around the new Xcode 9. This is a perfect tutorial if you are a beginner in iOS Development. Let's start… 🚀
On the top left sidebar, we can see many tabs available. This is probably the most used area as it contains many key features that Xcode offers called navigators
. I would start explaining them one by one (from left to right).
Google Maps SDK for iOS using Swift 4 - The App Space_Many iOS apps use Google Maps. This is a very common feature, so I have decided to prepare an ultimate guide on Google…_theappspace.com
Moving on the other side of Xcode. On the right side, you can see another sidebar with various tabs. But, unlike the left sidebar, this one contains a different set of tabs (depending on your location). On this side, the tabs are called inspectors
.
If you click on a Swift/Objective-C file you will see the following tabs.
You will use these tabs to less than 10% of your projects, but let's cover them.
2. Quick Help Inspector - provides you with a documentation for a selected class. For example, find a String
class inside your file, and move the cursor to that word. A quick explanation about the class will appear.
If you click on a .storyboard file, in the right corner you will see a new set of tabs.
2. Quick Help Inspector - same info as above.
3. Identity Inspector - controls the identity of the UIViewController. By identity we understand, assigning a custom class, providing a storyboard ID so you can access the view controller via code, and User Defined Runtime Attributes
where you can add various styling properties, instead of adding them via code (example: layer.cornerRadius
).
4. Attributes Inspector - this inspector is used for adjusting the properties of the selected object. Each object contains its own set of properties. For example, the UILabel
contains settings like adjusting text, text color, font, background color etc. You can also add your own properties, by using @IBInspectable
.
5. Size Inspector - I think the name explains it all. Anything related to the sizing of the object can be found here. Despite the x, y, width and height values you can find the Auto Layout constraints, or Autoresizing if you aren't using Auto Layout.
6. Connections Inspector - used for communication between the code and the view controller using @IBOutlet
and assigning actions via @IBAction
.
I will go through the .xcassets file which can be found in any project. It's used for storing your assets.
Two of the three tabs are already familiar to you from the previous points above.
Next on the list is the header. We are going a little bit above the left and right sidebar, at the very top of Xcode.
**Left Side**You can find actions like run and stop your project from building, managing your target's schemes, or picking and downloading a new simulator.
**Right Side**A place where you can apply different options to the editor. I would start explaining them from left to right.
The next three icons that are located in the top right corner, represent the showing and hiding of the sidebars and the debug area. It is used if you lack space on your screen (i.e. working on a MacBook Pro 13" screen) and want to give more focus on the coding area. 🤓
We have finished exploring the coding area. Now let's proceed with something more complex. Something that doesn't involves code. We will go through the project settings. I am sure you have seen this screen before, so I will start explaining the tabs directly.👇 I will explain only the most used ones.
General
Capabilities
3. Resource Tags - you can assign tags to resources, and they will all end up here. I have never used this feature, but if you want to find out more about it, you can check here.
4. Info - this tab shows the properties from your active .plist file. From here, you can add/edit/remove the property information.
5. Build Settings - the official Apple documentation explains this part well… "A build setting is a variable that contains information about how a particular aspect of a product’s build process should be performed. For example, the information in a build setting can specify which options Xcode passes to the compiler."This tab contains many settings that are related to the build process. From assigning provisioning profiles to adding directory paths for 3rd party libraries. Each target has its own Build Settings.
Build Settings
6. Build Phases - provides you a list of all your files that will be included in the compile. All your frameworks, assets, .swift files, storyboards will be shown here, with an option to add or remove. Also, there is a Run Script feature where you can add your own shell script.
7. Build Rules - Xcode gives you a possibility to write your own rules. If you got decent scripting skills you can write almost anything. For example, converting .css files into .c, or add formatting rules to the text inside the .rtf file.
VIP Sports Bet Tips & Scores on the App Store_This app is only available on the App Store for iOS devices. Increase your profits by following our professional BET…_apple.co
Introducing Clean Swift Architecture (VIP)_Forget MVC, now!_hackernoon.com
Your ultimate guide to the Google Maps SDK on iOS, using Swift 4_Many iOS apps use Google Maps. This is a very common feature, so I have decided to prepare an ultimate guide on the…_medium.freecodecamp.org
SWIFT — Custom UIView with XIB file_Custom UIView with XIB file is a very common practice in iOS Development. Custom UIView classes don’t contain XIB files…_medium.com
How to add Spotlight support to your iOS app_A Swift tutorial that will make your app available in Spotlight search_hackernoon.com
Core Data Relationships_Understanding One-to-One and One-To-Many relationships_hackernoon.com
Understanding Auto Layout in Xcode 9_All you need to know about Auto Layout_hackernoon.com