Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swipe to pop makes images jittery

When I do the swipe to pop gesture from a view controller with images to another there's a jittery glitch in the disappearing view (the 1px white line). I'm using the system swipe UIGesture. Any idea on how to solve that? Thanks! enter image description here

View Hierarchy

+ Scroll View (container)
| - ContentView
| - - Header Image
| - - Title Label
| - - Author/ Date Label
| - - Post Content

Constraints

        |
|-[Header Image]-|
        |
|-[Title Label]-|
        |
|-[Author/ Date Label]-|
        |
|-[Post Content]-|
        |
like image 388
Gnurant Avatar asked Feb 15 '16 10:02

Gnurant


2 Answers

you need to describe the whole scenario

1- you need to make sure there is no empty pixel column in the image, once upon a time, a designer delivered to me a background image with empty pixel like this, i removed it in photoshop.

anyways, you mentioned you used constraints

2- try to make the factor of the constraint 1.01 or 1.02

please tell us more so we can help.

like image 196
DeyaEldeen Avatar answered Nov 15 '22 20:11

DeyaEldeen


I am not sure about why this happens, but can be solved by positioning image views x position to -1 instead of 0.

Update…

The is happens because of image size doesn’t scale to the image view size properly.

Eg: If image size width is 750 and image of the size 375, 750, 1500 will work properly. If you try to set image of the size 370, 300 etc then this problem occurs.

So make sure that your image size is proper.

like image 44
Arun Ammannaya Avatar answered Nov 15 '22 22:11

Arun Ammannaya