コード例 #1
0
ファイル: iOSApp.cs プロジェクト: ammogcoder/mobile
 static int GetMinBottomOffset()
 {
     if (Instance.m_selectedTab < 0)
     {
         return(UtilsiOS.IsiPhoneX() ? UtilsiOS.ROOT_BOTTOM_MIN_X : 0);
     }
     return(UtilsiOS.ROOT_BOTTOM_MIN);
 }
コード例 #2
0
ファイル: iOSApp.cs プロジェクト: ammogcoder/mobile
        public static double AdjustSize(double size)
        {
            double newSize = size;

            if (UtilsiOS.IsiPhoneXR())
            {
                newSize = size / 1.1f;
            }
            else if (UtilsiOS.IsiPhoneX())
            {
                newSize = size / 1.5f;
            }
            else if (UtilsiOS.IsiPhonePlus())
            {
                newSize = size / 1.3f;
            }
            return(newSize);
        }
コード例 #3
0
ファイル: iOSApp.cs プロジェクト: ammogcoder/mobile
        public static int GetVerticalOffset()
        {
            int offset = GetMinBottomOffset();

            if (iOSApp.CurrentOffset == 0)
            {
                return(offset);
            }
            offset += (int)(iOSApp.CurrentOffset * 0.8);

            // Special dealing with iPhone X:
            if (UtilsiOS.IsiPhoneX())
            {
                offset += 6;
            }
            if (IsLandscape)
            {
                offset -= 2;
            }

            return(offset);
        }