how do I init a view without setting its frame?
my designer gave me a bunch of images,i can figure out the position of those on screen, but what about the size? is there a way to set the view’s frame using the picture’s original size instead of specify it everytime?
thanks for any hint !
what kind of view is it? You can use a
UIImageViewif you want.I think
UIImageViewhas aninitWithImage:method that does what you want…Just pass in your image as a
UIImageinto theinitWithImage:method and it should fix the frame size depending on the image you supplied…