开发者

Adding an image to my UIViewController

开发者 https://www.devze.com 2023-01-11 20:39 出处:网络
just a quick question here. How can I add an image to my UIViewController. Currently, my view controller has a couple labels开发者_运维问答 and a couple buttons, but I have a file line.jpg that I\'d

just a quick question here.

How can I add an image to my UIViewController. Currently, my view controller has a couple labels开发者_运维问答 and a couple buttons, but I have a file line.jpg that I'd like to add to this view controller as well. And I'd like to add it at a specific location (namely, at the center of the screen). How could I (meaning, what is the code?) initialize some object (that encapsulates my image) and then add it to the screen?

Thanks!


Use UIImageView for that. http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImageView_Class/Reference/Reference.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号