Interface Builder UIImageView not showing image, only black screen - interface-builder

I have a UIView in Interface Builder and set up different UIImageViews for the background images that I want displayed that are not going to move at all (thus I didn't think I needed IBOutlets for them).
However, when the view is loaded on the iPad, it shows a black screen, and none of the images are shown.
Does something need to be set in Interface Builder to show the images?
Thanks

When you add the image to the Resources folder, you have to make sure that you check the correct target. In your case check the iPad target. I hope this works for you.

You do need to use IBOutlets to do this

I had a similar bug while using cocoa pods. The pod included a Default.png file that was being selected in interface builder over the file with the same name in the regular project.

Related

Using An Image View In Xamarin iOS

I am trying to setup an image view in my Main.Storyboard so that I can update it in my app extension. I am struggling to work out how to get the code to initialise the Image View. I feel so stupid for not being able to figure this out.
In Xcode, I am used to linking it by dragging the constructor (if that's what it's called) into the app code.
How is this accomplished in Xamarin?
Much thanks.
In the storyboard, select the UIImageView. Then in the properties window (on the right, usually) there is a Name property. That creates an outlet to your view controller class with UIImageView. You can access it in the ViewDidLoad method (that's the earliest it's guaranteed to be initialized) and setup the UIImageView however you need.
See this screenshot showing the Name property:

UICollectionViewCell for AppleTV does not display contents in Interface Builder

When trying to build up a UICollectionViewCell for an AppleTV app, its contents are not displayed, making it more difficult to good design. Does anyone know whether this is a bug or something I'm doing wrong?
The contents do appear when moving, below are 2 screenshots, one of the normal state, and one of the state of moving an element.
I'm using Xcode version 7.1.1 (7B1005)
I tried and it looks like the cell will only be rendered, if you embed it in a collection view which is embedded in the main view. Additionally you have to add some auto layout constraints:

how do you put a simple banner/image in OS X app window?

In IB, I put an Image View object in app window, and dragged a tiff from the finder into that space, turned off editing, and positioned/sized the image as a header banner. Looked fine in IB, but when built and ran, ImageView object is there only as a background filled box (without my tiff).
Could someone explain what steps I am missing or point me to an existing relevant answer?
Cheers!
PS: By banner I only mean a static image, nothing to do with html, nor iOS.
Have you put the image in an NSURL or CGImage variable? I haven't worked with any of the image frameworks lately but I know that the app needs to know where the image is. That's the first thing I would look at.
I didn't know you could drag an image from the Finder into an NSImageView. What I would do is add the image to the Xcode project, so that it will be added to the built app. Then the name of the image should appear in the list of choices for the image in the IB inspector for the NSImageView.

Using MonoTouch 5, my images are not displayed in Interface builder

I'm using MonoTouch 5 and I'm trying to use images from my MonoTouch project in Interface Builder. The images are available in IB and I'm able to drag them on the view, everything looks good in IB. When I run my monotouch project, I don't see any images.
I think the issue might be that when you make the reference to the image in IB, it will save that reference as 'myImage.png' even if the image you have is stored in 'Images/myImage.png' so when it comes to find the image in the root of your application, it is not there.
It might be worth filing this as a bug to see what we can do to get this fixed. Does moving your images from a folder into the root solve this issue?
ChrisNTR

#2x images do not display in XCode4 interface builder designer

I'm trying to design a xib using XCode4, but when I put down an image view that displays an #2x image xcode doesn't preview it correctly (it displays a missing image icon).
It works correctly when the app is run though.
As an example: I add a UIImageView to my view and set the image property to test.png.
In my project I add a file named test#2x.png.
In XCode 3.2 this image would have correctly displayed in IB, and the #2x version would have automatically half-sized on non-retina devices.
However in IB in XCode4 the image does not display.
Is anyone else experiencing this? If they are, it's a pretty massive issue.
Why not just add both images? AFAIK UIImage isn’t guaranteed to work like that.
I always use both sizes, having the #2x ones first, and unretining them using the free app unretiner from app store, and drop both sizes to the project. When referring to an image, instead of writing test.png or test#2x.png, I write test and xCode finds sizes to the corresponding devices, but YES! in IB, the image won't be displayed in this way, just a question marked blue screen; but that works fine when running the app.

Resources