INNER CODE UNIT · JavaScript

PAD_HEIGHT

lucasferreira/react-native-flash-message · src/FlashMessageWrapper.js:12

const PAD_HEIGHT = 1024; // iPad

const { height: D_HEIGHT, width: D_WIDTH } = Dimensions.get("window");

const isAndroid = Platform.OS === "android";

const isIPhoneX = isIphoneX();

const isIPad = (() => {
  if (Platform.OS !== "ios" || isIPhoneX) return false;

  // if portrait and width are smaller than the iPad's width...
  if (D_HEIGHT > D_WIDTH && D_WIDTH < PAD_WIDTH) {
    return false; // It is probably not an iPad
  }

  // if landscape and height are smaller that the iPad's height...
  if (D_WIDTH > D_HEIGHT && D_HEIGHT < PAD_WIDTH) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…