I am newer to iPhone development. It uses the Cocoa framework and for developing games, we can use Cocos2d framework that I know but I am confusing with the structure relationship between these to frameworks.
Is Cocos2d subclass of Cocoa ? Also how OpenGLES framework is related to Cocos2d ?
First, the actual SDK used on iOS is named Cocoa Touch (On MAC OS X, it's called Cocoa, btw.). It consists of a dozen frameworks that cover different aspects for writing iOS-Apps.
Cocos2d for iOS bases on Cocoa Touch and uses some of its infrastructure to provide an SDK that is most useful for 2d games.
To render the screen, Cocos2d uses OpenGLES (which as well is a part of Cocoa Touch).