10 Xcode shortcuts every iOS Developer should know

Whether beginner, intermediate or advanced developer, we all want to achieve our task by developing workable code. We want to accommodate changes soon to ensure efficiency too. But what if we are not too familiar with the IDE? We land up doing things that take much more time & effort than required. Xcode has a wide variety of these shortcuts, so here are some of them which helped us achieve our tasks faster: Move Line Up Command(⌘) + Option(⌥) + [ shifts the selected piece of code upward, to rearrange the current code. Alternatively, we can also use the same shortcut via Editor

Preferable Dependency Manager: Swift Package Manager(SPM) or CocoaPods

Recently, while using CocoaPods in my project, I realised the build time was taking longer. This led me to experiment with Swift Package Manager(SPM). So here I am sharing my findings with you based on these six criteria: 1.  Library Support: Even though both CocoaPods and SPM support Objective-C as well as Swift, CocoaPods has extensive support for varied types of libraries that help us in customising the project as per the user requirement. SPM is provided by lesser libraries resulting in fewer options to choose from. 2. Maturity: CocoaPods is a much stable and mature package manager than

Dynamic UIButton Font Size in Swift

In today's fast-paced world, everyone wants the comfort of preferences. With it comes the preference to personalize their devices too. This can be in the form of dark/light mode, wallpaper, ringtone. So do they get the flexibility of adjusting font size suitable to their eyes too? Yes, they get it! Dynamic font sizes make an app readable without much effort. We can implement dynamic font sizes using (Attributes Inspector → Font → Text Styles). Same illustrated below: a. Dynamic Font Setting for UILabel Note: Don't forget to select the Dynamic Type checkmark as shown in the last step above. Without it,

Integrate Fastlane with iOS App for Build Automation

As we all know uploading the iOS App on the App Store is a very long procedure. Some developer gets stuck at the certain point and fails to upload the app. So let's make the procedure very short of uploading the app with Fastlane Tool. Fastlane provides the easiest way to build and release the mobile apps. It handles the time-consuming task for you, so you don't have to waste your development time. Through Fastlane you can automate the process of taking the screenshot of the mobile app screen, building the app for the different environment such as Adhoc, Development,

Use of Auto Layout in iOS

What is Auto Layout? Auto Layout is a constraint-based layout system. It was introduced with Xcode 6 Beta. It allows developer to create an adaptive UI for the apps that responds appropriately to changes in screen size and device orientation. Auto Layout dynamically calculates the dimensions and position of all the views in your view hierarchy, based on constraints placed on those views. Why Auto Layout? Today we have lots of variants available of iPhone and iPad in size in market. So, the user have different iPhone or iPad as per their choice. But according to the developer when he

iOS 11 New Navigation Bar and Search Controller

As we all know the apple is bringing all the new changes in iOS every year, they are improving the the UIKit for the better User Interface for iOS. Today we will see 2 new changes of UIKit in iOS 11. Navigation Bar Controller A navigation bar appears at the top of an app screen, below the status bar, and enables navigation through a series of hierarchical screens. When a new screen is displayed the back button appear with the label of previous screen title on the left side of the screen. We can also add button on the right

Use of DateFormatter in iOS using Swift

The DateFormatter help in the conversion between dates and textual representations. For example :- If you are working on the project and you are dealing with date or time to show in your app screen, the date or time format you receive is different from the format you want to display. Let say you got the date in "2017-11-15" and you need to display on screen as "15 November, 2017" so DateFormatter help us for conversion in the format as we want to display. Now let's see some more example for date and time conversion. Let

Use of Apple URL Schemes using Swift Language

Apple URL Schemes helps you to access system apps in iOS. Native iOS app uses this schemes to integrate with system apps and provide a more seamless experience to the user. For example :- If your app display telephone number you can use appropriate URL to launch phone app whenever user click on the telephone number. There are many functions of Apple URL Schemes used for such as :- 1. Phone Link :- Phone link helps you to make dialing experience easy for specific phone numbers. It will prompt an alert to the user to make a call or cancel

Custom UISlider using Swift Language

UISlider is a control used to select a single value from a continuous range of values. Default UISlider just provides track and thumb with default color having minimum value to maximum value. You can drag the thumb from the start point to the endpoint continuously in the range set. Default UISlider If you are using this control in your project, you need to customize the control to make your screen attractive(as per the design). Now let's customize the UISlider: You can customize color, thumb image, and track color easily. Basic customization can be done in two ways:- From