uiimageview - iPhone UIView Sizing & Image Drawing -


I am developing a custom UIView component, this is a simple stopwatch, which contains PNG graphics for all the digits. There are lots of tutorials around this, so I'm putting it on most of my own. But I have two questions:

First of all, this component will always have a specific size (141 x 32), but I do not know how to specify it from within the UIWE sub-class. The "frame" property tells me not only the width and height, but also the situation of X and Y. Of course, I do not know this situation until the components are kept in some original view. How do i do this

Secondly, to illustrate images of all the digits within the component, I do not know that I should make UIImageView objects and should keep them as children, or I should just draw images directly to images Attract within. Displays stopwatch hours: minutes: Second tenth data, so at least one image will be updated ten times per second, and one image will be updated to each other. I can easily reassign the "image" property of UIImageView, or I can directly undermine everything using UIImages.

What should I consider in deciding on which drawing strategy? Are there some cases where one option is better than the other?

Edit:

I should also mention that I am trying to develop this component completely without XIB files, since I am trying to get a better understanding of the underlying mechanics of custom component development.

Just for 0,0 in x, in the starting position in y position. When you add it to your view, the original will be set to the actual position


Comments