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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 06-26-2011, 04:51 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 118
lexy0202 is on a distinguished road
Default Grouped TableView Cutomization

Hi All,

I was wondering is it possible to add another view (e.g. image) to the end or top of a grouped TableView, but not as a cell. The purpose of this would be to keep the grouped tableView background, and so that it scrolled with the tableView?

Thanks in advance,
Alex
lexy0202 is offline   Reply With Quote
Old 06-26-2011, 06:37 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2011
Age: 24
Posts: 40
FlyingV is on a distinguished road
Default UITableViewDelegate methods

Hi!

Look at the reference of UITableViewDelegate, there are two cool functions that (I think) will solve your problem:

- (UIView *)tableView: (UITableView *)tableView viewForHeaderInSection: (NSInteger)section

and

- (UIView *)tableView: (UITableView *)tableView viewForFooterInSection: (NSInteger)section

It is not as straightforward, as it seems, but maybe you have to do something like this:

in the first section (0. section), you should set up your view that you want to see on top of your table view in the following method: - (UIView *)tableView: (UITableView *)tableView viewForHeaderInSection: (NSInteger)section

in last section (numberOfSectionsInTableView - 1), you should set up the view you want to see at the end of your table view in the following method:- (UIView *)tableView: (UITableView *)tableView viewForFooterInSection: (NSInteger)section

I hope it helped, have a nice day!

Last edited by FlyingV; 06-26-2011 at 09:05 AM. Reason: missing details
FlyingV is offline   Reply With Quote
Old 06-26-2011, 08:36 AM   #3 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 118
lexy0202 is on a distinguished road
Default

Thanks that looks right
lexy0202 is offline   Reply With Quote
Reply

Bookmarks

Tags
custom, grouped, image, 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: 328
8 members and 320 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

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