Support for iOS 5.0 and add swipe gesture