UIScrollView is a class in C# that represents a scrollable view that allows users to scroll its content. The drag feature of UIScrollView enables the user to move the viewable area by dragging it with their finger.
Example 1: Creating a UIScrollView
To create a UIScrollView in C#, you can use the following code:
UIScrollView scrollView = new UIScrollView();
This code creates a new instance of the UIScrollView class.
Example 2: Setting the content size of a UIScrollView
To set the content size of a UIScrollView in C#, you can use the following code:
scrollView.contentSize = new CGSize(1000, 1000);
This code sets the content size of the UIScrollView to be a 1000x1000 point rectangle.
Example 3: Enabling drag
To enable the drag feature of a UIScrollView in C#, you can use the following code:
scrollView.scrollEnabled = true;
This code enables scrolling in the UIScrollView.
Package library: UIKit framework, which is a part of the iOS SDK.
C# (CSharp) UIScrollView.Drag - 15 examples found. These are the top rated real world C# (CSharp) examples of UIScrollView.Drag from package TheUnseen extracted from open source projects. You can rate examples to help us improve the quality of examples.