Swift

How To Fix Xcode Not Automatically Creating Bridging Header File Issue

If you want to import objective-c class’s .h and .m file into the swift project, Xcode will create an Objective-C Bridging Header file in the swift project automatically. But sometimes you will find it does not create the objective-c bridging header file, so you need to create and configure it manually. This article will tell …

How To Fix Xcode Not Automatically Creating Bridging Header File Issue Read More »

How To Call Objective C Code From Swift Project

When you develop an iOS app use swift, if you have some older function wrote by objective-c language, you can use the Objective-C bridging header file to import your objective-c header files to the swift project. And then you can invoke the objective-c class function from your app’s swift code. This article will tell you …

How To Call Objective C Code From Swift Project Read More »

iOS Swift Function External And Internal Parameter Name Example

When we define a swift function, we can provide function parameters to it, and each function parameter can have an external name and an internal name. External name is used by the caller to pass value to the parameter, internal name is used by the function body to get the parameter value. Below is a …

iOS Swift Function External And Internal Parameter Name Example Read More »

How To Add iOS App Icon, Image, Color Set To Xcode Project Assets Catalog Correctly

Xcode project organizes project resource files use Asset Catalog. Each asset catalog can contain multiple asset sets such as app icon set, image set, color set, etc. When you create an Xcode project use one project template such as Single View App, it will create a default asset catalog file Assets.xcassets in the project files …

How To Add iOS App Icon, Image, Color Set To Xcode Project Assets Catalog Correctly Read More »

How To Create, Align And Wrap Label Text Programmatically In Swift iOS App

UIKit.UILabel class is used to create a label in iOS swift source code programmatically. You can change label text, label text color, label background color, label border width, label border color by setting it’s properties. You can also change the label text alignment by change the UILabel object’s textAlignment property value t0 NSTextAlignment.left, NSTextAlignment.center or NSTextAlignment.right. …

How To Create, Align And Wrap Label Text Programmatically In Swift iOS App Read More »