Customize native alert view in iOS

Nearly every project/app needs an alert popup. It is an essential UI element to: Provide information/warning to the user before performing any actionHandle user interaction to perform any actionNotify the user on completion of an actionThe default alert popup is very simplistic. Nowadays, we see a unique style and attractive UI in popups rather than showing a classic native/default one. What do you show in a popup? Title, message, image, and action buttons. Isn't it? But if you want to make your custom alert popup, it requires a lot of effort as you need to manage UI

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,

Environment setup to manage different app name, icon and endpoint using Xcode Configurations in iOS Swift Language

As a Developer, you have many challenges while you are working with many environments and endpoint in the same project. Without environment setup, you have to set the endpoint and certificate every time for a different environment. If we Configure Xcode for the different environment, It takes care of all endpoint, certificate and bundle ids. so the user can test all beta, dev and live app on the same device. So, let's start with creating Endpoint Endpoint Configuration The first thing that you have to do is prepare Xcode configurations for the environment you want to use. In this post,

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

Face ID Authentication in iOS11 Swift Language

Apple released most interesting feature Facial recognition with iPhone X. Face ID is a new revolution in recognition. It is a powerful and secure authentication system that’s more convenient, faster and easy than Touch ID. Face ID is biometric authentication. Biometrics technology is mainly used for identification and access control. Touch ID recognition is also biometric authentication. Face ID uses LocalAuthentication Framework for authentication and Touch ID uses the same framework for authentication. This framework provides facilities for requesting authentication from users. It provides the interface for evaluating authentication policies and access controls and managing credentials with LAContext. LAContext

Make Indicator always visible for UIScrollView in iOS Swift Language

Naturally, Indicator of ScrollView is visible when the content view of ScrollView is longer than ScrollView height and user drag on Screen. As we all know It is a default functionality, we can't make it always visible directly. Using flashScrollIndicators() method we can make it visible. Example override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(true) scrollView.flashScrollIndicators() } But indicator only appears for some time after viewDidAppear method call and disappear again. Indicator only to reappear when the user touches the screen. To show indicator continuously without touching screen you can add flashScrollIndicators() method in Timer. Timers work in continuously with

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

3D touch Quick Actions in iOS Swift Language

In iPhone, A user can now press Home screen icon to immediately access 3D touch Quick Actions functionality provided by your app. By Pressing hard on the home screen icon can now launch a quick action menu to take the user directly to parts of the app. Users with devices that support 3D Touch will use this feature. You can add this feature quickly. Home Screen Quick Actions Quick actions can be static or dynamic. You can define static actions at build time and dynamic actions at runtime. Static actions are visible to the user when they install or update

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