Category: Xcode

  • Storyboard, Scene and Segue

    Storyboard in iOS is helps you to design the user interface of your App. A storyboard can contain one or more Scenes (View Controllers) and the connection or relationship between two scenes are known as Segue. This is how a typical storyboard with Scenes and Segue look. The above example storyboard contains two scenes, first…

  • Get your current address in Swift (Swift 5)

    In this Swift tutorial, we will see the steps required for using CoreLocation framework and retrieve the latitude and longitude of the location. Then use the CLGeocoder to reverse geocode the latitude and longitude details. This is a very basic tutorial that retrieves the location details on tap of a button and displays the information…

  • Swift – WebView demo

    Updated for Swift 5In this short tutorial, we will see an example in Swift programming language using UIWebView. The WebView will load a webpage and provide option to refresh, stop, go back and go forward. This tutorial should give a brief overview on how to declare IBAction, IBOutlets and use Objective-C classes (NSURL and NSURLRequest)…

  • Assertions supported in XCTest

    Here you can find the list of Assertions supported by XCTest and it is essential to know all these assertion if you are practicing Test Driven Development in IOS. You can get this list from XCTestAssertions.h XCTFail(<#format…#>) – This unconditionally fails the test. XCTAssertNil(<#a1#>, <#format…#>) – Failure message when object is not nil. XCTAssertNotNil(<#a1#>, <#format…#>)…

  • Content Priority in Auto Layout

    Auto Layout brings in lots of good features to ease the life of an iOS developer when designing User Interfaces. In this example, we will see how to use Content Priorities such as Content Hugging and Comrpession Resistance. I have created a project with Single View Template and dispayed Size Classes as we are going…

  • Search photos on Flickr – Web Service

    In this tutorial we will see the steps required to write a demo app that retrieves photos from Flickr based on search text and display them in a UICollectionView. This also covers how to integrate 3rd party libaries using CocoaPods. Flickr API Register your app in Flickr and get the API key details. You will…

  • 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…

  • Auto Layout in iOS

    Using Auto Layout feature developers can align UI controls for different devices, screen sizes and orientation. This reduces the code to be maintained and makes life easy for the developers. Auto Layout solves UI design issues by creating relationship between the UI elements. This follows constraint based layout system where you can define contraints for…