Archive

Posts Tagged ‘objective-c’

UIDevice+SystemVersion: A handy UIDevice category for checking system version in iOS apps

June 5th, 2012 Ahmet Ardal No comments

What

A simple, handy UIDevice category that makes checking system version in iOS apps easy.

 

Install

  • Grab the source from https://github.com/ardalahmet/UIDevice-SystemVersion
  • Simply drag the UIDevice_SystemVersion folder into your project in Xcode.
  • #import "UIDevice+SystemVersion.h" wherever you want to call system version convenience methods in your code.

Read more…

NSView+DisableSubviews: A handy NSView category for disabling & enabling views in Cocoa Apps

May 6th, 2012 Ahmet Ardal 2 comments

You sometimes want to disable/enable some UI elements in your Cocoa apps, while your app is performing a task or just when you want to disallow input on some certain UI elements. It’s easy when your window has a few UI elements but it becomes trouble when you have dozens of inputs or you want more flexibility. “NSView+DisableSubviews” is a handy NSView category for disabling & enabling UI elements in Cocoa apps easily.

Read more…

SSCheckBoxView: A check box UI control for iOS apps

December 7th, 2011 Ahmet Ardal 5 comments

SSCheckBoxView is a check box UI control for iOS apps. It provides standard check box functionality with two states (checked and unchecked) and 5 different visual styles.
Here are some instructions on how to use it in your iOS apps:

 

Add SSCheckBoxView to your project

Read more…

SSPhotoCropperViewController: A custom ViewController that provides UI for cropping photos in iOS apps

October 17th, 2011 Ahmet Ardal 14 comments

We all sometimes do something with photos in our apps. And apps that deal with photos in some way, whether it be editing, stylishing or sharing them, are becoming more and more popular every day.

In one of my apps I was recently working on, I needed a simple UI to crop a picture into a square shape. So I wrote SSPhotoCropperViewController. It’s a custom view controller that provides a simple, configurable and easy-to-use UI for cropping and scaling photos in iPhone & iPod Touch apps.

 

Add SSPhotoCropperViewController to Your Project

Read more…

GANHelpers: A helper class for using Google Analytics in iOS apps

October 16th, 2011 Ahmet Ardal No comments

Google Analytics is a full-featured, enterprise-class web analytics service from Google for tracking web and mobile application usage statistics. It’s a good idea to track how your customers use your app. There are many benefits of knowing how your app is actually being used. You can optimize some parts of your application, make decisions on adding, dropping or improving a feature or make modifications in UI to improve the usability of your app. You don’t want to work on a feature that nobody actually uses, right?

 

Google Analytics

Google Analytics

Read more…

How to Detect and Handle HTTP Status Codes in UIWebViews

August 18th, 2011 Ahmet Ardal 8 comments

Imagine you have the following problem: You want to load a url in a UIWebView. But the resource at that url requires authentication, and if the user is not authenticated the web page responds with a “403 Not Authenticated” without showing any other instructions on how to login or where to go next etc. Ideally you’d want to redirect the user to a page where she can log in and continue to browse the url. The problem is UIWebView does not provide any properties or methods for inspecting HTTP status codes. One workaround is to intercept the UIWebView request loading process and check whether the user is authenticated or not by loading the same url using an NSURLConnection and inspecting the response, then you can behave accordingly.
Read more…