سؤال

I want to call the SetContentOffset of a UIScrollView for example. Is there a way to check if the ScrollView object is disposed prior to calling it?

هل كانت مفيدة؟

المحلول

Set the thing to null wherever you Dispose() it. Then check for null.

This is a good pattern anyway, so the C# object can be GC'd.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top