Ios UIButton subclassing with OpenGL -
is possible create subclasses of uibutton button drawing in opengl es? have game app uses opengl es far , not want add composited uikit elements on top of both performance , aesthetic reasons. again not want implement hit testing of touches against rects because correctly apple inner , outer rects , various state transitions quite lot of code. want have uibutton touch state changes have no drawing, while allowing me draw buttons myself in various states using opengl along rest of drawing code. suggestions or code examples of how proceed?
i found 1 answer question make use of uibutton use custom style. if not set actual images button states not draw @ all, still functions button calling when desired action detected in rectangle supply. way can make regions of gles texture active buttons. can callbacks when button touched or released or without action , can update texture in response these if desired. in end did not this, used custom buttons images per normal uikit use. did not find excess slow down of app using uikit on top of opengl es.
Comments
Post a Comment