Category: Xcode

  • UICollectionView Demo in Swift

    UICollectionView can be used for displaying set of data in rows and columns The main difference between UICollectionView and UITableView is that CollectionView can be display more than one column. The following topics are covered in this article Simple collection view demo Displaying data in Collection View Implementiing Custom Cell  Adding Section Headers Highlighting Cell Insert…

  • Access Control in Swift

    Swift like other programming languages provides option to restrict access to classes, functions, variables, structs, enums etc applying the required Access Control. These restrictions are based on each module, as per Apple documentation a module is defined as A module is a single unit of code distribution—a framework or application that is built and shipped as a…

  • Add annotations and Polyline to MapView in Swift

    In this article, we will see the instructions for adding annotation to MapView, Draw Polylines and Zoom to a region in Swift. Let us see this by adding stations to a Map for Chennai subrban trains and connect these stations using Map Overlay. Project Setup   Create a new project by selecting Single View Application…

  • Navigation Controller in iOS

    Navigation contollers are quite commonly used in iOS App. Navigation Controllers contain stack of view controllers and provide a drill down approach for accessing the child view controllers. The top bar in a navigation controller is called the navigation bar which normally contains the title of the screen. The navigation bar in child View Controller…

  • Swift Demo – Add Progress Bar

    In this short tutorial, we will see the steps required to add UIProgressView to a Swift IOS Project. UIProgressView and UILabel showing the current progress will be added programmatically to the View Controller. Create a Single View Application and navigate to ViewController.swift file. Add UIProgressView and UILabel Add the following code snippet below the class…

  • Create new Test Target in Xcode

    Listed below are the steps to add test target for an existing iOS Projects (iOS 6.0 and older). Click File menu -> New and Select Target from the menu list. Then select Cocoa Touch Testing Bundle under iOS -> Other template section. Enter product name for the new target and other details and click FInish.…

  • DatePicker Demo in Swift

    In this short tutorial, we are going to see the steps required use DatePicker in a iOS / Swift project. This demo is done by adding the DatePicker controls to Interface Builder and not programmatically. Date Picker Mode Date Picker control allow developers to specify the mode such as Date, Time, Date and Time and…

  • How to display line numbers in Xcode

    Listed below are the steps to display line number in Xcode editor window. This is quite useful when you are working in a ground and want to communicate the line number of statement to other members. Click Xcode menu option and select Preferences from the menu list In the Preferences window, click Text Editing tab.…