Swift Blogs Skip to main content

Posts

Showing posts from November, 2018

Custom Navigation Bar: Swift 4.2

Overview Hello iOS Developer, we all want our custom module which helps us dynamically and in easy of implementing with our purpose. Here image, show what we going to learn in this tutorial. Custom Navigation Bar: Swift 4.2 As you can see over here there are two labels and one image view with the image of the drop-down arrow. Here two labels are stack in the vertical stack view and image view and vertical stack view will be stack in horizontal stack view. At last, we are going to add a target to handle tap event on title view. I'm assuming that you are familiar with project setup. Open Storyboard, an embed navigation controller to view controller. Create a new swift named it " NavigationTitleViewDropdown ". Now here we are going to create a class with the same name as a swift file, a superclass will be UIButton because we required tap event handling. Now we are going to create some variables. First one is label title a compute variable here we are going to ch

Local Authentication: Swift 4.2

Local Authentication: Swift 4.2 Hello Everyone, This article will be going to teach about Local Authentication. How to use, implement with using a custom struct. Hope you will like it. A quick demonstrate regarding what we going to learn in this tutorial. As you can see, a single authenticate button when I pressed, it presents Authentication alert which allows us to scan our biometric with reason message why we want to use user biometric. If user authentication is successfully completed then I have shown an alert popup with a successfully authenticated message. If the user biometric unable to recognize, so we can use passcode fallback functionality for the authentication. I'm assuming that you are familiar with project setup. Open Storyboard, Drag an UIButton named it as Authenticate. Jump to ViewController Class create an IBOutlet for Authenticate button and IBAction for it. That's it for design related stuff. Create a new swift file and named it properly, mine