Ask webkit iOS a repaint
On iOS6 I had a problem with elements not rendered after changing page in my JS SinglePageApp.
To resolve that, I needed to ask webkit to repaint the view. Two solutions :
forceRedraw: (el) ->
element = $(el)
newEl = document.createTextNode(' ')
element.append(newEl)
newEl.parentNode.removeChild newEl
element
And the magic one \o/ :
el.style.webkitTransform = el.style.webkitTransform
Written by iam4x
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#