monkeyswarm / MobMuPlat

MobMuPlat is an iOS & Android app to host PureData patches with custom visual interfaces and hardware access.
www.mobmuplat.com
Other
185 stars 25 forks source link

setPage not working properly #44

Open Reinissance opened 6 years ago

Reinissance commented 6 years ago

On iPhone 8 with iOS 11.x it jumps too far for some reason, not even hitting a page...

korakios commented 6 years ago

It's an old known bug. Maybe it has to do with different resolutions between devices.

https://github.com/monkeyswarm/MobMuPlat/issues/18

Reinissance commented 2 years ago

Replacing zoomToRect:CGRectMake with setContentOffset:CGPointMake workedd for me...

boscomac commented 2 years ago

@Reinissance, could you explain how and where to do this ?

Reinissance commented 2 years ago

in MMPVIewController line 1702 replacing

[_scrollView zoomToRect:CGRectMake(pageIndex * _scrollView.frame.size.width, 0, _scrollView.frame.size.width, _scrollView.frame.size.height) animated:YES];

with

[_scrollView setContentOffset:CGPointMake(pageIndex * _scrollView.frame.size.width, 0) animated:YES];

should do the trick, I think.