Get Updates By E-mail 

Subscriber Counter

iOS Development Source Code Examples

This section is for app source code examples and code snippets that do not come with an in-depth tutorial.

Example: A Swift Language Based Hacker News Reading App

I’ve posted about a few open source hacker news clients listed on the open source apps list.

Here’s an example hacker news client built-in Swift called SwiftHN released by Thomas Ricouard.

While more features are on the way, the client allows you to read the news, view articles, view comments, and send articles to the Safari reading list. The client uses a library called HackerSwifter providing a Swift based parser for creating your onw Hacker News client.

Example Source Code: A Unique iPad 3D Modeling App With Export Features

Previously I mentioned a couple of open source libraries allowing you to create some interesting graphical effects from Bartosz Ciechanowski – BCGenieEffect which allows you to apply genie animation effects similar to those seen in OS X to a UIView, and CAMeshTransform which allows you to apply animated mesh transforms to a view.

Example: A Punch Clock App That Uses Geo-fencing With iBeacons

Earlier this year I mentioned a nice tutorial on creating a treasure hunting app utilizing iBeacons.

Here’s a very slick open source app called PunchClock from Panic that utilizes iBeacons.

PunchClock uses geofencing to automatically track when a worker enters into the area, and they automatically punch in, and punch out with a beautiful interface showing those who are in or out.

Here’s an image showing PunchClock in action from the readme:

Open Source UIWebView Library Adding Response Handling, User Agent Setting And More

In the past I’ve mentioned some UIWebView alternatives most recently TOWebViewController and DZWebBrowser.

Here’s a library providing a UIWebView subclass adding a number of nice features called OTMWebView from Otium.

OTMWebView adds features for response handling, progress tracking, detecting title changes, and the setting of user agents to the web view.

Here’s a code snippet from the readme showing how to use the response handling capability:

-(void)webView:(OTMWebView *)webView didReceiveResponse:(NSURLResponse *)response forRequest:(NSURLRequest *)request {

<pre><code>if ([response.MIMEType isEqualToString:@"video/mp4"]) {

    [webView stopLoading];
    // Do something else...
}
</code></pre>

}

You can find OTMWebView on Github here.

Example: Recreating The Twitter App Startup Transition In Swift With Core Animation

Yesterday I mentioned a component allowing you to easily replicate the animated view bending effect as seen in the Skype app.

Here’s another project created to show how to replicate the effect of a popular app providing source code example and brief tutorial showing how to recreate the Twitter bird zoom in transition seen when opening the Twitter app from Rounak Jain.