Tag Archives: iOS

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
-_hackFor11408026_endAppearanceTransition.

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