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 09-13-2011, 03:04 PM   #1 (permalink)
MuseBox
 
Join Date: Mar 2011
Posts: 18
karthi16 is on a distinguished road
Exclamation Horizontal scroll view inside a tableview

Hi,

I have a requirement which lists the Cricket players in a table view with thier names and their stats like the following

HTML Code:
 Name           total    4's  6's   1's  average
 Tendulkar       231      O    6     5      3.6   
 Gangully        212      9    0     8      4.5
  Etc .....

the total number of stats is like 8 to 10 , for that I have to make the stats horizantally scrollable, freezing the name. Can anyone explain me how to acheive this in a table view
__________________
Listen to Bollywood music on your iPhone - Tandora Radio

Listen to your favorite radio channels in your iPhone - MuseBox Radio
karthi16 is offline   Reply With Quote
Old 09-13-2011, 03:09 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

I don't think that UITableViews are meant to be a substitute for a standard grid view, so this UI you are proposing would probably be very clunky and confusing for the user. You should find some other way the display the data in the tableview rather than horizontally scrolling.
smithdale87 is offline   Reply With Quote
Old 09-13-2011, 03:25 PM   #3 (permalink)
MuseBox
 
Join Date: Mar 2011
Posts: 18
karthi16 is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
I don't think that UITableViews are meant to be a substitute for a standard grid view, so this UI you are proposing would probably be very clunky and confusing for the user. You should find some other way the display the data in the tableview rather than horizontally scrolling.
Thanks for your response, I have seen several apps in app store implement this beautifully, please try using Fantasy monster application(can check this out only if you have a nfl fantasy player in yahoo). But just wanted to let you know that its possible to do that, Just don't know how :-) .

Thanks for trying to help
__________________
Listen to Bollywood music on your iPhone - Tandora Radio

Listen to your favorite radio channels in your iPhone - MuseBox Radio
karthi16 is offline   Reply With Quote
Old 09-13-2011, 03:32 PM   #4 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Ah, I didnt say it wasn't possible, I was just implying that if you did implement it, you would have to be very careful about how you did it. It's nice to know that some other apps have done this successfully. Can you post some screen shots from those apps?
smithdale87 is offline   Reply With Quote
Old 09-13-2011, 03:34 PM   #5 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

I think there's a video clip on the website: FantasyMonster App for iPhone|FantasyMonster

It's by our own bignoggins
baja_yu is offline   Reply With Quote
Old 09-13-2011, 03:38 PM   #6 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

After looking at the video, I don't think they are using a table view at all. Just a scrollview for vertical scrolling, with multiple sub-scrollviews to scroll the horizontal contents for each section.

Edit: The screen I'm looking at has all the players with a bunch of stats. It's called "My Lineup"

Last edited by smithdale87; 09-13-2011 at 03:42 PM.
smithdale87 is offline   Reply With Quote
Old 09-13-2011, 06:41 PM   #7 (permalink)
MuseBox
 
Join Date: Mar 2011
Posts: 18
karthi16 is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
After looking at the video, I don't think they are using a table view at all. Just a scrollview for vertical scrolling, with multiple sub-scrollviews to scroll the horizontal contents for each section.

Edit: The screen I'm looking at has all the players with a bunch of stats. It's called "My Lineup"
Is there any example for the approach you mentioned. please share.
__________________
Listen to Bollywood music on your iPhone - Tandora Radio

Listen to your favorite radio channels in your iPhone - MuseBox Radio
karthi16 is offline   Reply With Quote
Old 09-13-2011, 06:55 PM   #8 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

It's not that hard. Give it a try. All you need are a few nested scrollviews, a big one for vertical scrolling, and one or several as subviews of that scrollview for the horizontal scrolling. If you've worked with one scrollview you'll be fine with several.
baja_yu is offline   Reply With Quote
Old 10-13-2011, 08:20 PM   #9 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 1
iLuis007 is on a distinguished road
Default How about this ??

I have the same idea here. But i just can't make that works. I've tried to put a tableview inside a scrollview but no success.

Could you make it works ??

Thanks in advance.
iLuis007 is offline   Reply With Quote
Old 10-13-2011, 09:33 PM   #10 (permalink)
Registered Member
 
Join Date: Oct 2011
Location: NYC
Posts: 29
objch is on a distinguished road
Default

There's a pretty simple solution to this: Rotate a tableView 90 degrees, then in the cellForRowAtIndexPath method rotate the cell back 90 degrees.
objch is offline   Reply With Quote
Old 10-13-2011, 09:41 PM   #11 (permalink)
Registered Member
 
Join Date: Oct 2011
Location: NYC
Posts: 29
objch is on a distinguished road
Default

Here's an example:

Code:
- (void)viewDidLoad {
      
        [super viewDidLoad];        

        float  angle = -0.5 * M_PI;
        CGAffineTransform transform = CGAffineTransformMakeRotation(angle);
        CGRect rect = tableView.frame;
        [tableView setTransform:transform];	
        tableView.frame = rect;
}

- (UITableViewCell *)tableView:(UITableView *)_tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *cellIdentifier = @"Cell";

    UITableViewCell *cell = [_tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    
    
    if (cell == nil) {

        CGRect rect = cell.frame;
        float  angle = -1.5 * M_PI;
        CGAffineTransform transform = CGAffineTransformMakeRotation(angle);
        cell.transform = transform;
        cell.frame = rect;
     }

     return cell;
}
You'll need to remember to switch any values for height/width. And you'll need to import QuartzCore
objch is offline   Reply With Quote
Reply

Bookmarks

Tags
custom cell, iphone scrolling, iphone sdk, tableview

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: 407
15 members and 392 guests
7twenty7, Eclectic, eski, EvilElf, fiftysixty, HemiMG, iOS.Lover, JackReidy, jarv, sacha1996, teebee74, tim0504, UMAD, VinceYuan, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,905
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

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