LoginSignup
0
0

More than 5 years have passed since last update.

【Swift4】WebViewを固定する〜シュッてやっても動かないようにする〜

Posted at

恥ずかしながら、スワイプって言葉が頭に出てこなくて、
地味に探したので自分メモ。。。orz

参考:http://www.sirochro.com/note/swift-webview-bounce-false/

縦方向のスワイプに反応しないようにする
   webView.scrollView.bounces = false

以下、x-codeより

var scrollView: UIScrollView { get }
The scroll view associated with the web view.
Declared in WebKit

associated:関連付いた
Declared:宣言された

var bounces: Bool { get set }
A Boolean value that controls whether the scroll view bounces past the edge of content and back again.
If the value of this property is true, the scroll view bounces when it encounters a boundary of the content. Bouncing visually indicates that scrolling has reached an edge of the content. If the value is false, scrolling stops immediately at the content boundary without bouncing. The default value is true.

The default value is true
デフォルトはtrue(スクロールがシュッシュできる)

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0