question

SatyaRamprasadKapakayala-1608 avatar image
0 Votes"
SatyaRamprasadKapakayala-1608 asked RobCaplan edited

Setting WkWebview.scrollview.bounces to false has no change in horizontal bounces in IOS

Create a View controller and add a web view to it.
Make sure web page has horizontal and vertical scroll list or items
When scrolling to any direction, screen bounces appears and i added the code WebView.ScrollView.Bounces = false. It stopped vertical bounces but not horizontal.
Can someone help with this issue?

Thanks in advance !

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ColeXia-MSFT edited

Hello,

Welcome to Microsoft Q&A!

Check UIScrollView.AlwaysBounceHorizontal .


If set to true and Bounces is true, then bouncing will occur when horizontal scrolling reaches the end of the view.

You can disable the property and Bounces as well .


WebView.ScrollView.Bounces = false;
WebView.ScrollView.AlwaysBounceHorizontal = false;


(It's weird , since UIScrollView.AlwaysBounceHorizontal is false by default ,but you can try the code above ).


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ColeXia-MSFT ,

Thanks for the quick response.

I tried setting alwaysbouncehorizontal to false, but it didn't worked out.

0 Votes 0 ·
ColeXia-MSFT avatar image ColeXia-MSFT SatyaRamprasadKapakayala-1608 ·

Could you provide the url so that we can test ?

0 Votes 0 ·

Hi @ColeXia-MSFT ,

Sorry for late reply. I need few approvals from client and manager to share html/url here. kindly understand.

Please check this url http://54.160.249.182 . In the screen there are three tabs and its tables. Even setting all bounces properties to false, tables are still bouncing horizontally.

         WebView.ScrollView.Bounces = false;
         WebView.ScrollView.AlwaysBounceHorizontal = false;
         WebView.ScrollView.AlwaysBounceVertical = false;


0 Votes 0 ·
Show more comments