Posts

Showing posts from June, 2017

Swift Optional

Some people found it very confusing initially but when you will understand then it is simple. As we know optional tells itself about it. It's two cases. The first case when a value can be present for a type, then we need to unwrap if need to use it. Second case when a value can not be present for a type. We use '?' to mark a value as optional. class Student {     var name: String ? //  name becomes optional } When you declare the name string as optional by marking ' ? ' then it's valued automatically is set to nil.  NOTE: Swift 'nil' is not same as objective c 'nil'. In Objective-C, it is a pointer to an object which does not exist whereas in swift it's just an absence of a value for a type. let person = Student() print( person .name) When you access the name it will print a  nil . As there is no value assigned to name. Once we will provide a value to name, let say, "Swift". Then it looks like.

What's New in iOS 11.0

As Y'all know #WWDC17 already started. So here you can find new dishes !! in your dev plate. Few dishes like ARkit, Musickit and etc. You will loveit. I am just writing main points below for more details please check the release notes link in the bottom of the page. ********* General  ********* New - Support for binary (non-text) barcodes. Added API To: AV Foundation Core Image Sirikit  Support detection, decoding and creating barcodes with binary content Added  CIBarcodeDescriptor , a new barcode descriptor object to Core Image to provide interoperability with AV Foundation and the Vision APIs. ********* ********* New - MusicKit. ********* ********* MusicKit gives your app access to the full Apple Music catalog, and to the user’s library. MusicKit gives your app access to the full Apple Music catalog, and to the user’s library. Added and updated functionality in StoreKit for retrieving client tokens and storefront identifiers. Added and upd