
- iOS Tutorial
- iOS - Home
- iOS - Getting Started
- iOS - Environment Setup
- iOS - Objective-C Basics
- iOS - First iPhone Application
- iOS - Actions and Outlets
- iOS - Delegates
- iOS - UI Elements
- iOS - Accelerometer
- iOS - Universal Applications
- iOS - Camera Management
- iOS - Location Handling
- iOS - SQLite Database
- iOS - Sending Email
- iOS - Audio & Video
- iOS - File Handling
- iOS - Accessing Maps
- iOS - In-App Purchase
- iOS - iAd Integration
- iOS - GameKit
- iOS - Storyboards
- iOS - Auto Layouts
- iOS - Twitter & Facebook
- iOS - Memory Management
- iOS - Application Debugging
- iOS Useful Resources
- iOS - Quick Guide
- iOS - Useful Resources
- iOS - Discussion
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 Articles
- How to enable/disable data connection in iOS programmatically?
- Disable Orientation Change in iOS
- Set scroll view with intervals in JavaScript
- Scroll Element into View with Selenium.
- How to disable ScrollView Programmatically in Android?
- How to disable the network in iOS Simulator?
- How to lock Screen Orientation programmatically in iOS?
- How to change screen brightness programmatically in iOS?
- How to answer incoming call programmatically in iOS?
- Adding Navigation Bar programmatically iOS using Swift
- How can I disable/enable GPS programmatically in android?
- How to enable/disable the GPS programmatically in Android?
- How to take a screenshot programmatically in iPhone/iOS?
- How to programmatically prevent scrolling in WebView of iOS?
- How to create Picker programmatically from array in iOS?

Advertisements