 |
 |
|
 |
10-07-2009, 05:47 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: The Netherlands
Age: 28
Posts: 86
|
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?
Last edited by EeKay; 10-08-2009 at 11:57 AM.
|
|
|
10-08-2009, 11:04 PM
|
#2 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: The Netherlands
Age: 28
Posts: 86
|
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?
|
|
|
10-08-2009, 11:11 PM
|
#3 (permalink)
|
|
Emphasizing Fundamentals
Join Date: Jul 2009
Location: Loveland, OH
Age: 34
Posts: 1,981
|
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.
|
|
|
10-09-2009, 08:18 AM
|
#4 (permalink)
|
|
Registered Member
Join Date: Sep 2008
Location: Woonsocket, RI
Age: 42
Posts: 42
|
Quote:
Originally Posted by EeKay
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
|
|
|
10-10-2009, 04:54 AM
|
#5 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: The Netherlands
Age: 28
Posts: 86
|
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.
|
|
|
10-10-2009, 07:40 AM
|
#6 (permalink)
|
|
Registered Member
Join Date: Sep 2008
Location: Woonsocket, RI
Age: 42
Posts: 42
|
Quote:
Originally Posted by EeKay
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.
|
|
|
10-17-2009, 01:56 PM
|
#7 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: The Netherlands
Age: 28
Posts: 86
|
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.
|
|
|
02-09-2010, 03:47 AM
|
#8 (permalink)
|
|
Registered Member
Join Date: Sep 2008
Posts: 41
|
Quote:
Originally Posted by EeKay
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?
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 415 |
| 45 members and 370 guests |
| aoredsson, aryaxt, ataranlen, beginer2007, BolderImage, BrianSlick, Chilibird, dcinqc, develsolutions, Dorald, dre, Erle, Eskema, Exaviorn, fordprefect77, Hanks2000, harrytheshark, HemiMG, hoisty, iTrackiGiveaway, Jompe71, Krakau, LemonMeringue, Locker, MartinIngvar, Max, meosoft, Meoz, mikeyb, MiniRobinho, Nanyko, nibby, noobAppDeveloper, Nuncha, skela, snowboarderz69, spikeyfish2, stack_trace, Tambourin, thegreyit, Tom Powered, tychop, upperhouse, vibhorgoyal, walkman2001 |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,300
Threads: 39,100
Posts: 171,421
Top Poster: smasher (2,575)
|
| Welcome to our newest member, lending |
|