iphone - How to "reset" to the starting view? -
i have first sample iphone application - version of tictactoe. it's working fine 1 time %) cant figured out how reset view in game starting position.
i followed formic game example "iphone cool projects" book. create controller, view , mark x or o signs in game via uiimageview add subview view. that's ok , works fine. want remove x , o's , start new game - , cant understand how clear screen. btw game example book didn't have resetgame method :(
i tried release view think wrong - clear screen got memory errors later , cant initialize board again. tried call viewdidload - nothing. best practice this?
thx!
to clear xs , os uiimageviews, send them -[uiview removefromsuperview]
message. remove them superview , visible ui. if not retained object removed memory well.
you use release memory management tool. never use remove visible elements ui or other functional task.
Comments
Post a Comment