Category: ios

  • Class and Struct in Swift

    Download the playground file from github (Classes and Struct) Class A class is a blue print for a real-word entity such Player, Person etc. and it is used for creating objects. Class can have properties to store values and methods to add behaviour. Let us see this with an example class called Rectangle which has…

  • What is the difference between Swift and Objective-C

    Objective-C Swift Syntax C style syntax with small-style message passing Modern and Concise Syntax Safety More permissive and allows runtime errors Strong focus on safety – enforcing memory safety, nullability check, type safety Performance Not faster than Swift Swift uses advanced compiler optimisation techniques. Interoperability Compatible with both C and C++ Swift needs bridging headers…

  • Optional binding and Optional Chaining

    Swift has a feature that lets users to assign optional value to a variable or a constant. Optional variable or constant can contain a value or a nil value. Let us take the following example which tries to find a given string in a array of string. Optional Binding var fruits = [“Apple”,”Orange”,”Grape”,”Mango”] let searchIndex…

  • Attribute Unavailable: Estimated section warning before iOS 11.0

    Xcode 13 (iOS 15) displays the following warning message for project having minimum deployment as iOS 10. Attribute Unavailable: Estimated section header height before iOS 11.0 Attribute Unavailable: Estimated section footer height before iOS 11.0 This warning gets displayed for new UITableViewController added to the Storyboard file. You can get rid of the warning messages…

  • Add path variable in MacOS for flutter

    Flutter commands can be executed from macOS terminal app after adding the path variable to installation of flutter directory on the local machine. You can set Path variable temporarily by executing the following command in the Terminal app or within the Terminal window inside Visual Studio Code where FLUTTER_INSTALLATION_DIRECTORY represents the installtion of flutter SDK…

  • We have blocked all requests from this device – Firebase Phone Authentication

    Firebase enables apps with Phone Authentication feature but when testing your app you might have received the following error. We have blocked all requests from this device due to unusual activity. Try again later. This user usually occurs when you have received too many OTP’s within a short period of time.  And we have to…

  • PDFKit – View, Annotate PDF file in Swift

    In this demo, we will be using PDFKit to View and Annotate PDF file. Let us start by selecting a Single View App template and name the project as PDFDemo. For this demo, we will be using a PDF file “TheWakingLights.pdf” and this can downloaded from the github project folder. Now drag and drop this…

  • Tab Bar Controller with WebView

    In this article, we will see step by step instruction on working of Tab Bar Controller, UIWebView and Activity Indicator by loading couple of web pages using UIWebView in two different Tabs. Tab Bar Controller Tab Bar Controller is used for organising list of View Controllers by having seperate tabs for each View Controller. Check…