Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Check Wifi Network reachability in Swift

In Swift if you want to check the Wifi connection in your device then use following code. This is a function which returns Reachability instance (reachability class object) value as a returnvalue for wifi connection availability. + (instan...

How to get view controllers from navigation controller in swift

Hi Readers! Please find below the code that you can use to get view controllers stack from Navigation Controller in swift. var vc:NSMutableArray = ((navigationController?.viewControllers as! AnyObject) as! NSArray).mutableCopy() as! NSMuta...

Custom Check For iPhone , IOS Version , Email And Phone Number in swift

Hello Readers, These are some of the custom checkers to detect iPhone Current IOS Version Email Validation Phone Number Validation For iPhone 4 and 4s :- func isIPHONE4() -> Bool{ let screenSize: CGRect = UIScree...

Redirect to app settings in iPhone

If you want to redirect to app settings from your app then use below code to do it. Apple provides a list of URLs to redirect the app to its setting section. Here is the code :- In a Swift Program:- UIApplication.sharedApplication().ope...

How to convert NSData to NSString or vice versa in Objective C and Swift

Hi Readers! In this blog you can find both versions (Obj C & Swift) for converting NSData to NSString or vice-versa. Objective C NSString * str = @"Hello"; NSData * data =[str dataUsingEncoding:NSUTF8StringEncoding]; NSLog(@"Data = ...

Send mail using iOS

Sometimes we need to send the email from iOS application for that we have to integrate MFMailComposeViewController in our application so that we can send email. This program will help you to send email through your app using swift. Steps Requ...

How to show alert view in Swift (iOS8) with OK and Cancel button?

To show an alert view in swift while using iOS8. Here is an example of how to use it: var MyAlert = UIAlertController(title: "Logout", message: "Are you sure?", preferredStyle: UIAlertControllerStyle.Alert) var MyOkayAction = UIAlertAction...

Difference between 'var' and 'let' in swift programming language

In Swift, both defines a variable. The let keyword define a constant like let api_key = 42979 The api_key cannot be changed afterwards; Its value is set once and only once The var define an ordinary variable that hold the data like ...

How to show an alert view in Swift Programming Language?

To show an alert in Swift programming language, you need to first import the UIKit framework then use UIAlertController object. A UIAlertController object displays an alert message to the user. Important: UIAlertView is deprecated in iOS 8....

Tuples in Swift

Tuples is a new concept that is introduced in swift programing. Tuples group the multiple values in a single compound value. It is not necessary that the each tuples value should have the same datatype. The datatype can be different and number of...

Quick reference of swift language comparison with Objective C

Quick reference of swift language comparison with Objective C code
prev 1 2 next
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: