So I have my UIScrollView
,
var myScrollView = UIScrollView(frame:theFrame)
and I would like to disable vertical scrolling. Does anyone know how to implement this using Swift?
Try this. This sets the content size to the height of the frame so it disables vertical scrolling because it can display the whole size.
let scrollSize = CGSizeMake(theFrame.size.height, yourWidth)
myScrollView.contentSize = scrollSize
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With