chevron-up bell reply instagram twitter2 feed3 finder search-25px-p0

Tag Archives: Swift

A comparison between Kotlin and Swift: Collections

Similar to Swift, collection in Kotlin includes: List Set Map 1. List Features of List: May have duplicate element May hold different data types All elements are unordered Similar to array in swift, list can be immutable and mutable. With immutable list, it can't be added……

Optional in Swift (Easy Start with examples)

Optional in Swift Swift is designed as a type Safe language. With the introduction of Optional, Swift solved the issue that variable can be nil or not in Objective-C, which makes the code more robust and safe. Optional is like a box, you can put normal type (Int, String, object……

Selector in Objc/Swift

In this short article you will know: Selector in Objc Selector in Swift Passing value using Selector Selector in Objc: Selector is a concept of Objective-C Runtime, which allows to turn a method's name (NSString) into a SEL type. Basically you cand find @selectoreverywhere, s……

iOS TableView Development Tips

The following are some frequently used iOS TableView tips while developing: Change the tableview background color: Sometimes you probably need to change the whole table view background. self.tableView.backgroundColor = colorTableview; ……

Delegation in Swift

Similarly, in Swift you can have Delegation: Step 1: Create a new Cocoa class, i.e WeatherService.swift, in this Swift file which include: A Protocol A Delegate Property WeatherService.swift .gist table { margin-bottom: 0; } Step 2: Implement Delegation .gist table { margin-……

Swift Extension and Objective-C category

Category in Objective-C, Extension in Swift are the same concept. They can help you to organise your class code. With category and extension, you don't have to create a inherited class. Extension in Swift Step 1: Create a Swift file Then in the Swift file: .gist table { margin……

A Quick Start on Carthage

0x00: Install Carthage on you mac: brew install Carthage 12 brew install Carthage  0x01: Under your project root directory, vim Cartfile: Notice: == 1.0 means using version 1.0 >= 1.0 me……

Use default iOS URL Schemes

// Make a phone call [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:12125551212"]]; // Open an url using default brower Safari [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.arkilis.me"]] // Send an email by……