Added iOS 6 compatibility for initWithDelegate