// Create a new UIScrollView object UIScrollView scrollView = new UIScrollView(); // Set the scroll view's frame and content size scrollView.Frame = new CGRect(0, 0, 200, 200); scrollView.ContentSize = new CGSize(400, 400); // Check if the scroll view is at the top of its content bool isAtTop = scrollView.AtTopOf;
// Create a new UIScrollView object UIScrollView scrollView = new UIScrollView(); // Set the scroll view's frame and content size scrollView.Frame = new CGRect(0, 0, 200, 200); scrollView.ContentSize = new CGSize(400, 400); // Set the scroll view's content offset to the top of its content scrollView.ContentOffset = new CGPoint(0, 0); // Check if the scroll view is at the top of its content bool isAtTop = scrollView.AtTopOf;In this example, we create a new UIScrollView object and set its frame and content size. We then set the content offset of the scroll view to the top of its content. Finally, we use the AtTopOf property to determine if the scroll view is at the top of its content or not. Package library: UIKit.