(2-D Poker Game based on UIKit)
I have a PNG resource image file containing a matrix of 52 playing cards and have a few questions on how to reference each card to be set into a view.
With DirectDraw, it is standard practice to load a large primary source image that is comprised of a matrix of smaller images within a single PNG resource into an offscreen surface. The developer is then allowed to define a source rectangle within the offscreen surface to BitBlt a specific image to the display at any location.
How do I do this with the UIKit's frameworks for a non-InterfaceBuilder based 2-D application?
If I load a large source image that is comprised of a matrix of smaller images with UIImageView or UIImage, how to I retrieve an individual image within the main source image an set it into the view?
It appears that we are only allowed to set the image position (x,y) within the view, along with width and height rather than define a rectangle within the source image when using the UIImageView, etc..
Do I really have to create 52 views to have access to each playing card when utilizing the UI-interface?
Is it typical practice to pre-load all of the image resources (PNG's) into views at the start of the application and release them when the application quits?
Basically, I would like to create 5 views (one for each card position) and then load a card deck image that dynamically set cards within the card deck image into each view. Is this possible with the UIImage or UIImageView?
Thanks guys.
I have a PNG resource image file containing a matrix of 52 playing cards and have a few questions on how to reference each card to be set into a view.
With DirectDraw, it is standard practice to load a large primary source image that is comprised of a matrix of smaller images within a single PNG resource into an offscreen surface. The developer is then allowed to define a source rectangle within the offscreen surface to BitBlt a specific image to the display at any location.
How do I do this with the UIKit's frameworks for a non-InterfaceBuilder based 2-D application?
If I load a large source image that is comprised of a matrix of smaller images with UIImageView or UIImage, how to I retrieve an individual image within the main source image an set it into the view?
It appears that we are only allowed to set the image position (x,y) within the view, along with width and height rather than define a rectangle within the source image when using the UIImageView, etc..
Do I really have to create 52 views to have access to each playing card when utilizing the UI-interface?
Is it typical practice to pre-load all of the image resources (PNG's) into views at the start of the application and release them when the application quits?
Basically, I would like to create 5 views (one for each card position) and then load a card deck image that dynamically set cards within the card deck image into each view. Is this possible with the UIImage or UIImageView?
Thanks guys.