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 swift project, Xcode will create an Objective-C Bridging Header file in the swift project automatically. But sometimes you will find it do not create the objective-c bridging header file, so you need to create and configure it manually. This article will tell you …
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 iOS app use swift, if you have some older function wrote by objective-c language, you can use 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 …
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 has an external name and an internal name. External name is used by caller to pass value to the parameter, internal name is used by the function body to get the parameter value. Below is a swift …
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 organize project resource files use Asset Catalog. Each asset catalog can contain multiple asset sets, for example app icon set, image set, color set etc. When you create a 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 system built-in text font, or you can customize the text font by provide 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 also …
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 UILabel object’s textAlignment property value t0 NSTextAlignment.left, NSTextAlignment.center or NSTextAlignment.right. You …
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 UIView object in swift. It will display three swift UIView animations. The first animation is a spring animation which will move a red view from screen top left to the bottom right. The second animation will show you how to move UIView from left to …
How To Add, Insert, Move, Remove Sub View In iOS Swift
Swift view can has subviews, the subview can has it’s own subview also. So you can implement a view tree in swift, all the subview is saved in a subview array, later added subview will override previous added subview. This article will show you an example to tell you how to add, insert, move and …
How To Add, Insert, Move, Remove Sub View In iOS Swift Read More »