Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-26-2009, 11:14 AM   #1 (permalink)
Registered Member
 
chuck's Avatar
 
Join Date: Aug 2008
Location: Berlin, Germany
Posts: 87
Default Display UIImageView under UITableView?

I'm going mad trying to figure out how to display an image of credit cards under a UITableView. You can see in my screenshot at Twitpic how I have my MainWindow.xib with a Root View Controller which should show RootViewController.nib. I have no idea why the image isn't displaying on the screen. You can see what shows up on the iPhone Simulator there. Does anyone have any idea what's going wrong here? I've been fighting with this for hours and this should be very simple! Any help would be greatly appreciated as this is the last thing needed in this app before release! Thanks in advance.
__________________
German Course: Learn German anywhere! Chess Player: Study Chess anywhere!
chuck is offline   Reply With Quote
Old 04-26-2009, 11:25 AM   #2 (permalink)
Registered Member
 
Forsworn's Avatar
 
Join Date: Oct 2008
Location: Germany
Posts: 504
Default

I assume with "under" you mean below, vertically.
So your tableview's frame doesn't fit the whole screen.

Are you using a UITableViewController as your superclass?
The UITableViewController set's it's view to the table view and because of that, your imageview doesn't show up.
You'll have to use a UIViewController subclass.

edit:
I'd rather set the UIImageView to the tableFooterView of your table. Otherwise it won't scroll... design question.

Last edited by Forsworn; 04-26-2009 at 11:28 AM.
Forsworn is offline   Reply With Quote
Old 04-27-2009, 02:36 PM   #3 (permalink)
Registered Member
 
chuck's Avatar
 
Join Date: Aug 2008
Location: Berlin, Germany
Posts: 87
Default

Wow, the tableFooterView is exactly what I needed. Can't believe I overlooked it earlier. I found the code I needed on the iPhone Club and modified it to the following:

Code:
UIImage *footerImage = [UIImage imageNamed:@"CreditCards.png"];
UIImageView *fView = [[UIImageView alloc] initWithImage:footerImage];
	
[self.tableView setTableFooterView:fView];
[fView release];
[footerImage release];
Works great, thanks so much!
__________________
German Course: Learn German anywhere! Chess Player: Study Chess anywhere!

Last edited by chuck; 04-27-2009 at 03:04 PM.
chuck is offline   Reply With Quote
Old 11-06-2009, 03:57 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 14
Default

Your code has a bug. footerImage should not be released.
vocaro is offline   Reply With Quote
Old 11-06-2009, 05:06 PM   #5 (permalink)
Registered Member
 
chuck's Avatar
 
Join Date: Aug 2008
Location: Berlin, Germany
Posts: 87
Default

Quote:
Originally Posted by vocaro View Post
Your code has a bug. footerImage should not be released.
Ha, you're right. Funny I missed that the first time. Thanks!
__________________
German Course: Learn German anywhere! Chess Player: Study Chess anywhere!
chuck is offline   Reply With Quote
Reply

Bookmarks

Tags
image, table, uiimageview, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 236
16 members and 220 guests
ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, F_Bryant, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0