Archive for May, 2011

27 MayGrand Central Dispatch magic – async image demo

The Grand Central Dispatch (GCD) is a big topic. The first thing I wanted to try when I started to learn it a few months ago is set of asynchronous operations like image downloads. Check out my old sample how to get Asynchronous UIImage from web or this one if you need to download a really big file in the background on the app launch.

Current sample is for situation when you need to download a set of files, so you must have a queue. The magic of GCD is that it manages queues automatically depending of available resources and their priorities. GCD does that efficiently because of low level implementation and Bloc

Demo

  • has a predefined set of urls to download
  • creates a GCD queue and starts to download images
  • shows each image as soon as it’s available with appearing–dissappearing animation

Implementation

Тhe demo result is nice Category UIImageView+DispatchLoad:

Note, this is just a sample how GCD works with queues and asynchronous operations. Don’t use it in production because it’s usually need to cancel and re-prioritize network downloads. GCD approach is nice for local operations like saving a big file to disk. GCD lets us to keep UI smooth while heavy operations – that’s the main point.

26 May500.000 Apps on the AppStore

Half a million is а big number for what ever it is. Especially when it is about the everyday applications made mostly by independent developers. In fact a great milestone was overcome. Without a doubt we will have an interesting and exciting future, and we are pleased to be part of this evolutionary process.

  • 85.000+ unique developers, 4.6 ave apps per develope
  • 37% of apps are free
  • $3.64 – the average price for paid apps
  • $891.982 – value of all live apps
  • 15% – Games, 14% – Books, 11% – Entertainment, 8% – Education, 7% – Lifestyle, 44% – Others

03 MayMobile Year in Review 2010 – More Mobile

01 MayCustom UISplitViewController for iPad

Fork me on GitHubOriginal UISplitViewController 

What important Apple says about its split (iPad-Specific Controllers):

  • A split view controller must always be the root of any interface you create.
  • The panes of your split-view interface may then contain navigation controllers, tab bar controllers,…
  • … the split view controller automatically handles most of the rotation behaviors
Everything is awesome except that we can’t use UISplitViewController inside TabBars. I’m sure there is a readon for that but sometime we need a bit more flexibility.


APSplitViewController 

The main reason for custom UISplitViewController — it’s possible to be extended. For now:

  • it always keeps both sides visible
  • it’s always launched in the Portrait but rotated to any direction properly
  • each side contains UINavigationController so it’s easy to do any navigation by pushing and poping UIViewControllers
  • any number of APSplitViewController can be used inside tabs of UITabBarController (APCustomTabBarController included)

Future releases

Besides APSplitViewController is used in 3 real project it’s still in the initial stage. Functionality was gutted because it was necessary to get the component working well in a short time, and other such developments had sinned in those places that were critical to the projects. That’s why we’ve built this.

I want in future releases:

  • launch with landscape mode (now it makes 20px shift)
  • optionally hide left side in Portrait
  • the divider to be drawn in CoreGraphics instead of PNG image
  • optionally move divider in runtime

Fork APSplitViewController on Github