开发者

How to create a horizontal transparent scroll bar?

开发者 https://www.devze.com 2023-03-30 04:02 出处:网络
I am trying to create something like this (look at the time), you can basically slide it horizontally.

I am trying to create something like this (look at the time), you can basically slide it horizontally.

How to create a horizontal transparent scroll bar?

开发者_如何学C

Can anyone give me any suggestions on how to do this in iOS?


You'd use UIScrollView which you can constrain to just horizontal movement. The Scrolling demo may help to get you started.


It is pretty easy:

  1. create a scrollview with frame of (xOrigin,yOrigin,SCREEN WIDTH,Height).
  2. set the content size to (CONTENT WIDTH, Height).
  3. setShowsHorizontolScrollIndicator to no to hide the scroll indicator.

Note: Width of the contentSize property should be greater than the frame width to make it horizontally scrollable.

0

精彩评论

暂无评论...
验证码 换一张
取 消