Category: Objective-C
-
Objective-C Generics
Re-watching the WWDC 2015, you probably noticed that it was all about Swift. That’s a given, with the release of Swift 2.0 back then, Apple announced a lot of additions to the Swift programming language such as protocol extensions, new error handling API and some additional syntax to name a few. That’s not the end of it, Apple also announced Objective-C Generics albeit ‘lightweight’. Since Xcode 7, generics became available…
-
Clang Language Extensions: instancetype
Objective-C is a rapidly evolving language faster than many other. ARC, object literals, subscripting, blocks: in the span of just three years, this is just an example of how fast it grows. One of the latest addition to ObjC is instancetype. Clang adds a keyword instancetype that, as far as I can see, replaces id…
-
iOS: AVPickerDimView
AVPickerDimView is a simple class combination of UIView, UIActionSheet, and UIPickerView. Installation There are 3 ways to download and import the files to your project: Download: After downloading and importing the files to your project folder, your next step is setting it up: Xcode: Usage Object initialisation: Checking if AVPickerDimView is present: Showing and Hiding…
-
iOS: NSString+HTMLHelper
NSString+HTMLHelper is a collection of methods that helps me deal with HTML tags and URLs. NSString+HTMLHelper Download Link Sample Usage: Please look at the demo project. It has sample codes on how to use the category. Methods: Install: Just copy the NSString+HTMLHelper Category or NSString+HTMLHelper.h and NSString+HTMLHelper.m files to your project and #import the header…
-
Snippets: NSLog and Macros Tips and Tricks
Tricks Some NSLog tricks I’m using on my escapade. These snippets are preprocessor macros that will help your debugging moments easier if not a lot. ALog This snippet will log everything every time you use it in a line. It will display the method name, the line number and the argument you gave. DLog This…
-
iOS: Venues using Foursquare API and iOS MapKit
Foursquare (foursquare) in their own words is a location-based mobile platform that makes cities easier to use and more interesting to explore. By “checking in” via a smartphone app or SMS, users share their location with friends while collecting points and virtual badges. Foursquare guides real-world experiences by allowing users to bookmark information about venues…
-
iOS: Table View using Property List
Table Views are the most common object used to display lists of data to the user. This objects are highly configurable, they can be made to look different things. Mail, Contacts, and Messages to name a few apps using the Table View. Mail uses table view to display lists of accounts, folders, and messages, but…
-
iOS: AVHexColor
AVHexColor is a class for iOS (iPhone & iPad) and OS X (Mac), inspired by the lack of hexadecimal colour integration of iOS. Install Recommended Podfile via CocoaPods Alternatives Sample Usage: Methods: And a lot of convenience methods… License AVHexColor is available under the MIT license. See the LICENSE file for more info.
-
Snippets: Set Network Activity Indicator On and Off
This little snippet will let you show the network activity indicator using ShowActivityIndicator(); and hide it with HideActivityIndicator();. If you work with network in your app, then this little code will be an invaluable asset. This will save you a lot of retyping. Just put this in a header file that will be imported in…
-
iOS: Hello World using Objective-C Class and IBAction
iOS applications use Cocoa classes, and these classes use the Objective-C programming language so one must know Objective-C if he/she does wish to develop iOS apps. We all know shifting from a loss, non-strict programming language might find iOS’s syntax seem strange and difficult. Don’t worry, this strangeness and difficulties will give way to an…