Image is not displaying (White blank space)?
Closed this issue · 3 comments
I currently have a view controller embedded in a navigation view controller. I added a tableview in storyboard, and connected it to my view. I then added the following line to my viewDidLoad method: [self.menuTableView addParallaxWithImage:[UIImage imageNamed:@"ParallaxImage.jpg"] andHeight:160]; and imported the image, but all I get is a blank white space where the image should be. menuTableView is the tableView that I'm working with.
Any idea why it isn't loading the image? I imported the library using cocoapods and imported the header file into my viewcontroller.
Are you sure your image really exists? For debugging you could try [UIImage imageWithName:@"Default"]
or some other image that you are sure exists and should load correctly.
Glad it worked out for you.
Found the bug. I think it is due to autolayout. Without autolayout it will work just fine, and with it you will have to put [self.menuTableView addParallaxWithImage:[UIImage imageNamed:@"ParallaxImage.jpg"] andHeight:160];
in viewDidLayoutSubviews