

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Disable Scroll View Programmatically in iOS?
Scroll View is one of the most difficult and complicated topic an iOS Developer come across. Here we will be seeing how to disable Scroll View Programmatically.
For disabling the same we need to make the “isScrollEnabled” property of our scroll view to false.
Copy the below code in your file.
import UIKit class ViewController: UIViewController { @IBOutlet var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() scrollView.isScrollEnabled = false } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
- Related Questions & Answers
- How to enable/disable data connection in iOS programmatically?
- Disable Orientation Change in iOS
- Scroll Element into View with Selenium.
- Set scroll view with intervals in JavaScript
- How to disable ScrollView Programmatically in Android?
- How to disable the network in iOS Simulator?
- Adding Navigation Bar programmatically iOS using Swift
- How to lock Screen Orientation programmatically in iOS?
- How to answer incoming call programmatically in iOS?
- How to change screen brightness programmatically in iOS?
- How to enable/disable the GPS programmatically in Android?
- How can I disable/enable GPS programmatically in android?
- How to Set opacity for View in iOS?
- How to programmatically take a screenshot on iOS?
- How to take a screenshot programmatically in iPhone/iOS?
Advertisements