iOS Tutorial

How To Add Multiple Buttons And Editable Text Field In iOS Alert Dialog Use Swift

This article will tell you how to add one button, two buttons, three buttons, and the editable text fields in an iOS alert dialog in swift. The alert button style type can be UIAlertAction.Style.default, UIAlertAction.Style.cancel and UIAlertAction.Style.destructive. Now let us look at the demo picture below.

How To Add Multiple Buttons And Editable Text Field In iOS Alert Dialog Use Swift Read More »

How To Fix Swift Error Unable To Activate Constraint With Anchors Because They Have No Common Ancestor & LayoutConstraints Unable To Simultaneously Satisfy Constraints

When I develop an iOS app, I add a UITextField in the app UI programmatically. And I also add some constraints to the UITextField object in swift source code to make it auto layout. But when I run the app, it throws an exception with the error message ‘NSGenericException’, reason: ‘Unable to activate constraint with

How To Fix Swift Error Unable To Activate Constraint With Anchors Because They Have No Common Ancestor & LayoutConstraints Unable To Simultaneously Satisfy Constraints Read More »

How To Display Or Hide View Controller Scene ( Document Outline ) Panel In Xcode Project

When I develop an iOS app with Xcode, I design the user interface by edit the Main.storyboard file. But when I click the Main.storyboard file to edit it, I can not find the View Controller Scene (Document Outline) panel at the center editor’s left side. This confused me a lot. Finally, I find the solution

How To Display Or Hide View Controller Scene ( Document Outline ) Panel In Xcode Project Read More »

How To Use iOS UISegmentedControl In Swift Programmatically Example

This example will tell you how to add and use the iOS UISegmentedControl object both in the Main.storyboard visually and programmatically in swift source code. There are two UISegmentedControl objects on the app screen. The above one is added to the Main.storyboard visually, when click it’s item, it will display the item title or image

How To Use iOS UISegmentedControl In Swift Programmatically Example Read More »

How To Use iOS UISwitch In Interface Builder And Programmatically In Swift Example

This example will tell you how to create and use the UISwitch component both in Xcode interface builder and swift source code. It will add one label, one UISwitch to the Main.storyboard. And the other UISwitch component is created and used in ViewController.swift file uses source code programmatically. Let us first look at the example

How To Use iOS UISwitch In Interface Builder And Programmatically In Swift Example Read More »

How To Change UITextField Keyboard Type And Hide Keyboard Automatically When Press Return Key

All the swift interactive UI components ( UITextField, UITextView, etc ) can prompt the keyboard automatically when you focus on it. And you can change the keyboard type both in the interface builder Attributes Inspector panel and programmatically. This article will tell you how to set the keyboard type and how to hide the keyboard

How To Change UITextField Keyboard Type And Hide Keyboard Automatically When Press Return Key Read More »