matrix of scrollers

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

matrix of scrollers

Post by endernafi » Mon Sep 24, 2012 2:06 pm

Hello Dear LiveCoders,

I'm trying to build a news app.
The main view should contain categories, which are listed vertically,
and each category should show thumbnail images of news, which are listed horizontally.
Each category and the main view should be able to be scrolled independently.
Now, I've come to a point but can't go further.
Here is my demo stack which contain 100 buttons as a matrix of 10*10.
It has 1 vertical scroller and 10 horizontal scrollers.
scrollerMatrix.zip
(3.9 KiB) Downloaded 293 times
There are two problems:
1. It doesn't go smoothly, as if iPhone can't determine which scroller is the target scroller i.e. the user's intended one to scroll.
2. Even it's at the bottom of the categories group, it scrolls only the top 3 horizontal scrollers.

I couldn't explain much clearly especially the second problem, please have a look at my stack in the simulator.
Any help much appreciated.


Regards,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: matrix of scrollers

Post by endernafi » Mon Sep 24, 2012 2:19 pm

You may check out the App Store on iPhone for an example.
It has one vertical scroller and 5 horizontal scrollers.
And all six of 'em works like a clock, no jumps no rough stops nothing.
As if iphone knows exactly which one I want to slide.
How are they doing this; I'm pulling my hair off 8)
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Youks
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 135
Joined: Mon Sep 05, 2011 6:08 pm

Re: matrix of scrollers

Post by Youks » Mon Sep 24, 2012 2:52 pm

Hi ,

I looked at your stack and my guess is :

-- "set the acceleratedRendering of this stack to true"
-- "set the layerMode " of your "scrollers" to "scrolling"

Start already with this to get decent scrollings (from LC5, check LC dictionary)!! :wink:

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: matrix of scrollers

Post by endernafi » Mon Sep 24, 2012 3:06 pm

Hi Youks, thanks for your reply.
Actually, all the horizontal groups' layerModes were "scrolling".
I must have forgotten to change the vertical big group's layerMode.
Unfortunately neither this nor the acceleratedRendering property didn't solve none of that two problems.
But thanks again...


Regards,

~ Ender Nafi Elekcioglu
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: matrix of scrollers

Post by endernafi » Wed Dec 05, 2012 4:49 pm

Hi all,

Well, I think I've managed it at last.
It's a basic implementation of a scroller matrix.
Being able to scroll different contents horizontally and/or vertically.
For an example think Pulse's homepage.
You can scroll categories vertically and each category's content horizontally.

I'm attaching my sample stack:
scrollerMatrix2.zip
(4.12 KiB) Downloaded 285 times
Issues:
* No acceleration/deceleration
* No scrollbars
* 32400px width/height limit of LiveCode native groups
* Bounce only via animationEngine
* Bounce not as smooth as native scroller
* Possibly more but these are which I'm aware of 8)

As always,
you may use my code in any project freely;
but please share any optimizations,
for the sake of Collective Intellect.
We are more clever when we share knowledge, as Jean-Marc {jmburnod} says...


Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Post Reply