I’ve developed the game zoo keeper on java platform. Now I need to make it run on ios, however I am not familiar with xcode and objc. I meet some problems when using UIView and UIImageview. Say we have 8*8 icons(images) with 5 types, we change two neighbor icons and whenever 3 icons or more are identical on horizontal or vertical line, they would be eliminated and create new icons to replace on previous locations. To implement it in java, i just need to check conditions and delete those eliminated icons and draw new ones(all according to the coordinates) then repainted the JPanel. But how would I implement it in ios? Not say eliminating process, I don’t even know how to align those 64 (8*8) icons on the UIView. At first I think maybe using the UIImageview and then addSubview on one background UIView. But if in this way, there would be 64 subviews, it would be totally a mess. I am so new to the xcode and objc, and I have only 2 weeks to finish the task. Can anybody help me to my problem? Thanks so much!!
I’ve developed the game zoo keeper on java platform. Now I need to make
Share
from what I gathered, in Java you just PAINTED the icons inside a JPanels paintComponent?
well you could do it totally analog in this case.. place ONE uiview on the screen which acts as your JPanel/Drawing Canvas. In drawRect do your drawing the same way as you did in java
@interface CustomView : UIView
@end
*typed inline, no guarantees ^^
that said, I would go with CALayers
not drawing it but using 64 sublayers.. well maybe not 64 … maybe you could group it a bit
=> you’d then have the benefit of implicit animations