Ejemplo n.º 1
0
        protected CGRect AdjustForSafeArea(CGRect bounds)
        {
            if (View is not ISafeAreaView sav || sav.IgnoreSafeArea || !RespondsToSafeArea())
            {
                return(bounds);
            }

            return(SafeAreaInsets.InsetRect(bounds));
        }
Ejemplo n.º 2
0
        protected CGRect AdjustForSafeArea(CGRect bounds)
        {
            if (View is not ISafeAreaView sav || sav.IgnoreSafeArea || !RespondsToSafeArea())
            {
                return(bounds);
            }

#pragma warning disable CA1416 // TODO 'UIView.SafeAreaInsets' is only supported on: 'ios' 11.0 and later, 'maccatalyst' 11.0 and later, 'tvos' 11.0 and later.
            return(SafeAreaInsets.InsetRect(bounds));

#pragma warning restore CA1416
        }