For an iOS app, using api call to populate data in the app. Check for internet connectivity is required to make app user experience a more better rather than not opting to detect availability of internet.Alamofire is network library written in swift and used in iOS app development for making network requests. This network library […]
In this tutorial, we will learn how to create a drop down using swift language in iOS app development. For creating a dropdown, we will use a cocoa-pod named “DropDown” by assistolab. Given below is the url for the pod documentation. You can check that for better understanding about the functionality or features provide by
By default parameters in swift function are constant. It means you can not change parameters values from inside of the function in swift. Sometimes we need to get parameters value to be modified from inside the function. So here, inout parameters comes to rescue as inout parameter in swift act like a reference type. Have
Earlier we use Reachability classes to check for internet connectivity in iOS sdk. In swift, we commonly use cocoa-pod named Reachability to monitor for network changes. With iOS 12.0, apple provide a new framework named Network framework. In Network framework, we have one class named NWPathMonitor that monitor for network connectivity in iOS sdk. In
Adding multiple targets to swift project is a need of hour. For example, if your app point to different end points. One end point is pointing to development server and second endpoint is for production or live server, then most common approach for a beginner iOS developer is to comment out different end points while
Apple provided AVKit framework, to allow developers play multimedia content inside their apps. With AVPlayerViewController, we can use Apple default playback controls. But in case if we want to play video in our customized player, then AVPlayer class comes to rescue. In this tutorial, we will learn how to play video using AVPlayer in swift.
Playing a video in swift is not a very complex task, but thanks to frameworks provide by apple. AVKit framework provides a high level player interface for developer’s to play video in swift language. AVPlayerViewController’s player is capable of playing video, either from file stored locally inside the app bundle or from a file hosted
Property observers in swift are somewhat like any other observers available in iOS SDK. In iOS app development, observers are the objects that notify user on a particular event. With property observers, a block of code gets called when property values changes. Property observers provides developer a handy way to monitor changes to the property.
Creating a re-usable UIView class but want to design user interface in xib. So you need to create a xib file for your custom class. Since xcode, does not allow developers to create a xib file while creating a new file having UIView as its base class. So in this tutorial we will learn, how
In this tutorial, we will learn how to show UIDatePicker on clicking UItextField. This kind of requirement comes up while user need to enter some kind of date as input with other fields. There are two solutions for this kind of requirement Add UIButton and on touch of it show UIDatePicker to user and set