Is there a control in Interface Builder (XCode 4) that can display an image?
I’d like to show a preview-thumbnail in that control during runtime.
Is there a control in Interface Builder (XCode 4) that can display an image?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Phillip (whose answer is now deleted) had the right approach. It sounds like what you are looking for is an image well (and the actual class name for this is NSImageView).
Now, if you want to have an actual control (e.g. a button or something else) with an image within it, that’s a little bit different. A NSButton dropped into some UI via Interface Builder can take an image, but you’d need to scale the button to be the appropriate size for the scaled down image and to assign the image, you must do it programatically via code (i.e. set the button to an outlet and then set the image that way).