Reputation: 2067
My code
CGRect viewRect = tableAnswerSheet.Frame;
CGRect mainRect = sv.Frame;
if(CGRectIntersectsRect(mainRect, viewRect))
{
//view is visible
}else{
}//view is visible
But getting this error.
The name `CGRectIntersectsRect' does not exist in the current context
Using
using CoreGraphics;
what is alternative class of CGRectIntersectsRect in Xamarin.ios
Thanks in advance
Upvotes: 0
Views: 398
Reputation: 1199
It is CoreGraphics.CGRect.Intersects
https://developer.xamarin.com/api/member/CoreGraphics.CGRect.IntersectsWith/p/CoreGraphics.CGRect/
CGRect viewRect = tableAnswerSheet.Frame;
CGRect mainRect = sv.Frame;
if (viewRect.IntersectsWith(viewRect))
{
//view is visible
}
else {
//view is visible
}
Upvotes: 1