how to map design in iPhone objective C
i have a question that suppose i have 1 png which background is transparent and all the custom design are their suppose this: http://www.creativetechs.com/iq/tip_images/iPhoneElements-Yahoo.png
i want that i have add the png in my code and how could i get the cordinate and implement those images cordinate 开发者_StackOverflowinto UIImageView and when its run the it can grab those cordinate from the png and map the design.
I know its possible their is some software which can give the plist of those cordinate and then map it please any one guide me. Thanks.
This question/answer explains how to create the subimage: Return a subimage from a UIImage
I would suggest storing the coordinates in a plist (as you suggested) and using the above method to create each subimage from you sprite sheet.
(code from the above post)
CGRect fromRect = CGRectMake(0, 0, 320, 480); // or whatever rectangle
CGImageRef drawImage = CGImageCreateWithImageInRect(image.CGImage, fromRect);
UIImage *newImage = [UIImage imageWithCGImage:drawImage];
CGImageRelease(drawImage);
精彩评论