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 …
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 Customize Swift Label Text Font And Set Text Shadow
Swift UIKit.UIFont class is used to specify the label text font. You can use a system built-in text font, or you can customize the text font by providing the font name and font size. This example will tell you how to specify system font or provide customize text font to swift label component. It will …
How To Customize Swift Label Text Font And Set Text Shadow 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 »
Swift UIView Animation Example
This example will show you how to implement animation for the UIView object in swift. It will tell you how to implement the below three swift UIView animations. The first uiview animation moves a red view from the screen top left to the bottom right use swift code. It is a spring animation. The second …
How To Add, Insert, Move, Remove Sub View In iOS Swift
A swift view can have subviews, the subview can have it’s own subview also. So you can implement a view tree in swift, all the subviews are saved in a subview array, later added subview will override previously added subview. This article will show you an example to tell you how to add, insert, move …
How To Add, Insert, Move, Remove Sub View In iOS Swift Read More »