ios - Make static UIView sticky when UIScrollView is scrolling -


  • i've got scroll view (diagram: words) longer device height
  • at bottom of scroll view bottom content (diagram: french press) different background colour.
  • to separate bottom content words, i've created 1pt high uiview act border (diagram: red line)
  • i have button sits on bottom of device, outside scroll view (the scroll view device.height - button.height). button's background colour matches bottom content's background colour.

the different background colours pretty wonky without separating bottom button content view, while bottom content not visible, i'd border sticky, , appear sitting above bottom button (diagram: red line).

a small note: i'm using autolayout in ib, have iboutlet created border constraint can manipulate in code.

enter image description here

here lib job: https://github.com/ericcastro/ecstretchableheaderview

(it works uitableview in sample implementation based on uiscrollview)

you have update code changing logic: here view on top, whole principle there!


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -