Block in Objective-C

A typical example of using block: // Traditional block in method parameters - (double)driveForDuration:( double)duration withVariableSpeed:(double (^)(double time) )speedFunction //block is in the normal function definition steps:(int)numSteps { double odometer = 0.0; double dt = duration / numSteps; for (int i = 1; i <= numSteps; i++) { odometer += speedFunction(i *dt) * dt; }
Read More »

Use topLayoutGuide and bottomLayoutGuide in Masonry

Masonry is a quite handy framework that you can use code to control constraints with a range of fexibility. Here is the link of its github public page: https://github.com/SnapKit/Masonry Sometimes, we need to render view under the status bar or navigation bar. In this tutorial there will be two examples on this: Example 1: Put
Read More »

AFNetworking 3 common usage template

AFNetworking 3 has coming out earlier this year (2016), which supports iOS 7+, Mac OS X 10.9+, watchOS 2+, tvOS 9, and Xcode 7. This article can be appendix of its official documents. According to its official updates: https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide Some NSURLConnection APIs Have Been Removed In AFNetworking 1 or 2, AFHTTPRequestOperationManager is commonly used. In
Read More »

Web & iOS Development Project

date: 2015-10-30 17:07:07 ElectronicSeeds Online System ElectronicSeeds iOS App 1. ElectronicSeeds Online System http://www.electronicseeds.com About & Features: Startup Company Project. Enable user to share any information with others at anytime anywhere. There is also an iOS app which enable user to operate on their mobile. Demonstrate real-time data (such as user’s click) Represent real-time statistic
Read More »

A Quick Start on Carthage

0x00: Install Carthage on you mac: brew install Carthage 0x01: Under your project root directory, vim Cartfile: Notice: == 1.0 means using version 1.0 >= 1.0 means using version 1.0 or higher ~> 1.0 means using version 1.0 but lower than version 2.0, i.e. 1.2 0x02: In your project root directory, run: carthage update --platform
Read More »

iOS App: Property Queensland

Property QLD iOS App About & Features: This is a real estate project, aim for providing great service properties buyers in Queensland. Compatile with multiple screen size 4″, 4.7″ and 5.5″ Support from iOS 7 APN remote push notification Auto Layout CoreData CoreLocation MapSDK Technology & Skills: Xcode 7 Objective-C iOS SDK 7,8 Sketch 3
Read More »

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.needone.app"]] // Send an email by calling Email app [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:arkilis@gmail.com"]]; // Send a SMS [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:0400000000" // Make a phone call UIApplication.shared.openURL(URL(string: "tel:12125551212")!) // Open an url using default brower
Read More »

Shopping List App

About Shopping List is an iOS App Features 1.Add/remove item (e.g., add apple, peach, milk) Be able to add a Item, the new Item should have a different name with current ones Item have attributes such as name, count, unit, purchase_status Be able to delete a Item 2.Create/delete categories and add item in them (e.g.,
Read More »

Protocol in Objective-C

A protocol is a group of related properties and methods that can be implemented by any class. They are more flexible than a normal class interface, since they let you reuse a single API declaration in completely unrelated classes. This makes it possible to represent horizontal relationships on top of an existing class hierarchy. Which
Read More »