05-03-2012 06:33 AM
I made an app with brightcove. In Android it works fine...
html
<section class="page pageOne">
<header></header>
<div class="scroller"></div>
</section>
<section class="page pageTwo">
<header></header>
<div class="scroller"></div>
</section>
on Iphone I see all my views at once and no scrolling happens in my views
Solved! Go to Solution.
05-03-2012 07:55 AM
Can you .zip up your template and post it here?
05-03-2012 08:08 AM
05-03-2012 08:46 AM
Attached is an updated .zip with scrolling working correctly.
The issue was that the <div class="content"> and the <div class="scroller"> where flipped. (Scroller was inside of content instead content being inside of scroller.) To take advantage of App Cloud's built in scrolling you need two things:
The typical structure is:
<!-- Your page which will take up the entire viewport -->
<section class="page">
<!-- A class of header on a block element for your fixed header. This is optional -->
<header class="header">Your header</header>
<!-- A block element with a class of scroller to -->
<div class="scroller">
<!-- A block element whose content will be scrolled -->
<div class="content></div>
</div>
</section>
I also noticed that you had a .scrolling-element-class with the relatively new CSS of:
overflow: auto;
-webkit-overflow-scrolling: touch;
In App Cloud we have not yet started taking advantage of this because we have found it to be very buggy. Content will often not be rendered when it is scrolled into view. I took this out of your stylesheet as I expect it could cause problems.
- Jesse
05-04-2012 03:08 AM
Hello Jesse,
Thx! Tested and the scroller class works.
However I can still slide from pageOne to pageTwo on Iphone... Any idea how I could solve that?
I had the .scrolling-element-class in it because my App Clouyd's built in scrolling wouldn't work. You fixed that :) so it can be trown out.
Tanja
05-04-2012 08:24 AM
Hi Tanja,
To make it so that you cannot scroll left to right you just have to add the following code to your JavaScript file:
//Stop scrolling from left to right on pages
$( document ).bind( "touchmove", function(evt) {
evt.preventDefault();
});
This something we plan to add to the SDK by default but for now you can add that code. I have also attached an updated version of your app for your convenience.
- Jesse
05-04-2012 08:59 AM
Hello Jesse,
Thank you! Would be great if added to the sdk!
Tanja
Brightcove Inc., a leading global provider of cloud content services, provides a family of products used to publish and distribute the world's professional digital media. The company's products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 4,200 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs.
Brightcove Inc.
© 2012 Brightcove Inc.
