Tag Archives: iOS

Animating image change – simple way

Let’s imagine we have an UIImageView and we need to change its image in a nice way. Simply changing image would be not enough.
For this particular case we could add one method to UIImageView using Objective-C categories.
Continue reading


Simplifying Core Data setup

Most of developers use Core Data for persistence in iOS apps. I’d like to share my view on how to simplify Core Data stack setup and usage. Some of these could be used alone, or combined with other approaches.
Continue reading

Adding iOS 7 UI patterns to your app

Today we’ll study how to add controls with blurred background to an iOS app. This UI pattern is very common for iOS 7 apps. Some of the standard UIKit controls (like UINavigationBar or UITabBar) have similar functionality. But, what if you want to add blur to your custom control.

What you need to know is – nothing comes for free. You’ll have to do blurring, and maintaining this blur together with background changes. This example will cover only very simple scenario. But you’ll be able to extend it for more complicated cases.
Continue reading

Apple’s hidden message to developers

While preparing source code for one of the next posts, I’ve found nice piece of Apple’s humour.

UIViewController class has this private method declared: -attentionClassDumpUser:yesItsUsAgain:althoughSwizzlingAndOverridingPrivateMethodsIsFun:itWasntMuchFunWhenYourAppStoppedWorking:pleaseRefrainFromDoingSoInTheFutureOkayThanksBye:

I would totally agree with them, don’t mess with internal methods.

P.S. There also some leftovers from bugfixing, I suppose: -_hackFor11408026_beginAppearanceTransition:animated: and

Who knows, what is behind rdar://11408026?

How to pass a document from one app to another

This post will cover some of interoperability questions in iOS. Many business apps deal with documents (or files). Sandboxing approach of iOS prevents app from just browsing the file system and looking for files. However, sometimes app just needs to be able to pass file to another app. There is an app API for that.

Let’s see what do we need to cover these tasks:

  1. Registering our app as file handler
  2. Handling files passed from other apps
  3. Passing file from our app to other apps
  4. (optional) Previewing files

Continue reading