You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// // UIScrollView+Ext.swift // GME Remit // // Created by InKwon James Kim on 24/09/2019. // Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. //
import UIKit
extension UIScrollView { func toBottom() { if bounds.height < contentSize.height { let offset = CGPoint(x: 0, y: contentSize.height - bounds.size.height) setContentOffset(offset, animated: true) } } func toTop() { if bounds.height < contentSize.height { let offset = CGPoint(x: 0, y: 0) setContentOffset(offset, animated: true) } } }
|