Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Equivalent CGPointZero in Xamarin.iOS?

I want my UITextView to scroll to the top when the View appears.

UITextView*note;
[note setContentOffset:CGPointZero animated:YES];

but could't find CGPointZero or CGPoint.Zero in Xamarin.iOS. So what is the equivalent of it?

like image 205
Drunken Daddy Avatar asked Sep 04 '16 10:09

Drunken Daddy


2 Answers

It's CGPoint.Empty you can see it here:

https://developer.xamarin.com/api/field/CoreGraphics.CGPoint.Empty/

like image 108
Sven-Michael Stübe Avatar answered Nov 03 '22 01:11

Sven-Michael Stübe


It is CGPoint.Empty and you can set

UITextView note = new UITextView(); 
note.SetContentOffset(CoreGraphics.CGPoint.Empty, true);
like image 4
Fahad Rehman Avatar answered Nov 03 '22 00:11

Fahad Rehman