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 10-07-2009, 06:47 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: The Netherlands
Age: 30
Posts: 86
Default How to scroll vertically but cell-by-cell in a table view

Hello,

I want to scroll just vertically in my tableview like everyone else, but i am wondering how i could do this by making every cell as large as the view,

and scroll the cells on their entire height, just like with the scrollview?
I want to make it feel like it's "magnetic per cell" when a user scrolls through the cells...

Or should i just use a scrollview with separate views?
__________________
EeKay Sez:: : :

0110100001100101011011000110110001101111 to you !

WwW : www.eekay.nl
mniE : www.mynameise.com/eekay
Twitter : www.twitter.com/eekayonline

Last edited by EeKay; 10-08-2009 at 12:57 PM.
EeKay is offline   Reply With Quote
Old 10-09-2009, 12:04 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: The Netherlands
Age: 30
Posts: 86
Default anyone?

anyone know what is the best route?

Construct my own tableview-like component from scrollview with separate views? :$

Or is it easy to manipulate or extend a tableview to create this effect?
__________________
EeKay Sez:: : :

0110100001100101011011000110110001101111 to you !

WwW : www.eekay.nl
mniE : www.mynameise.com/eekay
Twitter : www.twitter.com/eekayonline
EeKay is offline   Reply With Quote
Old 10-09-2009, 12:11 AM   #3 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,129
Default

I did some work on an app that did this, and the basic approach was:

1. Add an overlay view that detects touches.
2. Manually keep track of the current row index.
3. Process the touches. If swipe up, increment the index; swipe down, decrement.
4. Use scrollToRowAtIndexPath:atScrollPosition:animated: with your new index

No idea if this is the best approach. Also, actual tapping of the rows was not required in this case, which is good because the overlay view was intercepting touches. If you would need to select rows, you'd have to do some work correlating touch coordinates to table rows, and then triggering the select action yourself.
__________________
BriTer Ideas LLC - Code review, consulting, development. PM for pricing.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
BrianSlick is online now   Reply With Quote
Old 10-09-2009, 09:18 AM   #4 (permalink)
Registered Member
 
mosttornbrain's Avatar
 
Join Date: Sep 2008
Location: Woonsocket, RI
Age: 44
Posts: 42
Default

Quote:
Originally Posted by EeKay View Post
Hello,

I want to scroll just vertically in my tableview like everyone else, but i am wondering how i could do this by making every cell as large as the view,

and scroll the cells on their entire height, just like with the scrollview?
I want to make it feel like it's "magnetic per cell" when a user scrolls through the cells...

Or should i just use a scrollview with separate views?
I think a scrollview would be easier to implement since it already provides the "magnetic" effect you are looking for.

Cheers,
Brian
Stormy Productions
mosttornbrain is offline   Reply With Quote
Old 10-10-2009, 05:54 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: The Netherlands
Age: 30
Posts: 86
Smile mind mumblin

i was thinking that scrollview ist the easiest too, but Brianslick's idea made me think about using the tableview again.

I could just as easily do it using the tableview without an extra overview layer. If i'd override the onclick functions i could stop anything from happening and detect the users scrollbehaviour. Then animate the cell scrolling up one or down one... sounds doable too.
__________________
EeKay Sez:: : :

0110100001100101011011000110110001101111 to you !

WwW : www.eekay.nl
mniE : www.mynameise.com/eekay
Twitter : www.twitter.com/eekayonline
EeKay is offline   Reply With Quote
Old 10-10-2009, 08:40 AM   #6 (permalink)
Registered Member
 
mosttornbrain's Avatar
 
Join Date: Sep 2008
Location: Woonsocket, RI
Age: 44
Posts: 42
Default

Quote:
Originally Posted by EeKay View Post
i was thinking that scrollview ist the easiest too, but Brianslick's idea made me think about using the tableview again.

I could just as easily do it using the tableview without an extra overview layer. If i'd override the onclick functions i could stop anything from happening and detect the users scrollbehaviour. Then animate the cell scrolling up one or down one... sounds doable too.
Since UITableView inherits from UIScrollView, I wonder if there's a simple way to get the UITableView to behave the way you want just by changing the UIScrollView property.
mosttornbrain is offline   Reply With Quote
Old 10-17-2009, 02:56 PM   #7 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: The Netherlands
Age: 30
Posts: 86
Smile Okay

the project where i am using this for is on ice for a couple weeks. I have heard some nice possibilities here. As soon as i get to this and have a working example, ill get back here to post it.
__________________
EeKay Sez:: : :

0110100001100101011011000110110001101111 to you !

WwW : www.eekay.nl
mniE : www.mynameise.com/eekay
Twitter : www.twitter.com/eekayonline
EeKay is offline   Reply With Quote
Old 02-09-2010, 04:47 AM   #8 (permalink)
Registered Member
 
Join Date: Sep 2008
Posts: 50
Default

Quote:
Originally Posted by EeKay View Post
the project where i am using this for is on ice for a couple weeks. I have heard some nice possibilities here. As soon as i get to this and have a working example, ill get back here to post it.
so have you implemented this using a tableview?
supertaurus85 is offline   Reply With Quote
Reply

Bookmarks

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: 594
21 members and 573 guests
Andy8888, Arfan, armmzz, bignoggins, BrianSlick, ckgni, devangvyas, Duncan C, Hito_kun, kvu, learningtocode, linkmx, LiquidFire, MarcoAlmeida, Monstertaco, oceanlablight, soonw29, sudama, Vineesh
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,775
Threads: 89,203
Posts: 380,590
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Andy8888
Powered by vBadvanced CMPS v3.1.0

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