Design pattern in iOS