diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Contents.json new file mode 100644 index 00000000..04d54485 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Home.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Home@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Home@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home.png new file mode 100644 index 00000000..7647f113 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@2x.png new file mode 100644 index 00000000..75004cc6 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@3x.png new file mode 100644 index 00000000..d4347a4b Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_1.imageset/Home@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/Contents.json new file mode 100644 index 00000000..4565c5f3 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_2@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_2@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2.png new file mode 100644 index 00000000..33f93b66 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@2x.png new file mode 100644 index 00000000..643579fd Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@3x.png new file mode 100644 index 00000000..530bd322 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_2.imageset/iPad_Home_2@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/Contents.json new file mode 100644 index 00000000..e7f48f28 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3.png new file mode 100644 index 00000000..16d70373 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@2x.png new file mode 100644 index 00000000..8fb7dcf6 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@3x.png new file mode 100644 index 00000000..4ad0de52 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_3.imageset/iPad_Home_3@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/Contents.json new file mode 100644 index 00000000..3c799730 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_4.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_4@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_4@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4.png new file mode 100644 index 00000000..13d8e597 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@2x.png new file mode 100644 index 00000000..2dac1edb Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@3x.png new file mode 100644 index 00000000..3ba9ef07 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_4.imageset/iPad_Home_4@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/Contents.json new file mode 100644 index 00000000..8b78f2ba --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_5.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_5@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_5@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5.png new file mode 100644 index 00000000..0cc14d9d Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@2x.png new file mode 100644 index 00000000..50bd2e3f Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@3x.png new file mode 100644 index 00000000..e76504e7 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_5.imageset/iPad_Home_5@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/Contents.json new file mode 100644 index 00000000..97d81a1b --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_6.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_6@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_6@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6.png new file mode 100644 index 00000000..a4aa6f7e Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@2x.png new file mode 100644 index 00000000..b25efce2 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@3x.png new file mode 100644 index 00000000..255518c2 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_6.imageset/iPad_Home_6@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/Contents.json new file mode 100644 index 00000000..587c8fa8 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_Final.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_Final@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_Final@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final.png new file mode 100644 index 00000000..29c373f3 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@2x.png new file mode 100644 index 00000000..7fc964d5 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@3x.png new file mode 100644 index 00000000..3a439b43 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Final.imageset/iPad_Home_Final@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/Contents.json new file mode 100644 index 00000000..1a7ba37f --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad_Home_Start.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad_Home_Start@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad_Home_Start@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start.png new file mode 100644 index 00000000..057f2706 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@2x.png new file mode 100644 index 00000000..bd06df73 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@3x.png new file mode 100644 index 00000000..471bc955 Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Home_Start.imageset/iPad_Home_Start@3x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/Contents.json b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/Contents.json new file mode 100644 index 00000000..18dea747 --- /dev/null +++ b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iPad Tags.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iPad Tags@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iPad Tags@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags.png b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags.png new file mode 100644 index 00000000..7aee348c Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@2x.png b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@2x.png new file mode 100644 index 00000000..52dac69d Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@2x.png differ diff --git a/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@3x.png b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@3x.png new file mode 100644 index 00000000..d69c09ee Binary files /dev/null and b/HackIllinois/Assets.xcassets/Home/iPad_Tags_Transparent.imageset/iPad Tags@3x.png differ diff --git a/HackIllinois/UI/HIAppearance.swift b/HackIllinois/UI/HIAppearance.swift index cc7242eb..7bee0c21 100644 --- a/HackIllinois/UI/HIAppearance.swift +++ b/HackIllinois/UI/HIAppearance.swift @@ -354,6 +354,7 @@ struct HIAppearance: Equatable { // Home page countdown fonts // static let newCountdownText = UIFont(name: "MontserratRoman-Bold", size: 48) // Hack 2023 static let newCountdownText = UIFont(name: "MontserratRoman-Bold", size: 42) // Hack 2024 + static let newCountdownTextPad = UIFont(name: "MontserratRoman-Bold", size: 56) // Hack 2024 static let countdownText = UIFont(name: "MontserratRoman-Bold", size: 25) // Onboarding fonts diff --git a/HackIllinois/UI/HILabel.swift b/HackIllinois/UI/HILabel.swift index 2c992aa0..069c4155 100644 --- a/HackIllinois/UI/HILabel.swift +++ b/HackIllinois/UI/HILabel.swift @@ -80,7 +80,11 @@ class HILabel: UILabel { case .newCountdown: textHIColor = \.countdownTextColor backgroundHIColor = \.countdownBackground - font = HIAppearance.Font.newCountdownText + if UIDevice.current.userInterfaceIdiom == .pad { + font = HIAppearance.Font.newCountdownTextPad + } else { + font = HIAppearance.Font.newCountdownText + } case .location: textHIColor = \.baseText diff --git a/HackIllinois/ViewControllers/HIHomeViewController.swift b/HackIllinois/ViewControllers/HIHomeViewController.swift index 8eaeb16d..fa04f246 100644 --- a/HackIllinois/ViewControllers/HIHomeViewController.swift +++ b/HackIllinois/ViewControllers/HIHomeViewController.swift @@ -66,8 +66,12 @@ extension HIHomeViewController { transparentImageView = UIImageView(frame: view.bounds) transparentImageView.contentMode = .scaleAspectFill transparentImageView.alpha = 0 - transparentImageView.image = UIImage(named: "Home_Tags_Transparent") - + + if UIDevice.current.userInterfaceIdiom == .pad { + transparentImageView.image = UIImage(named: "iPad_Tags_Transparent") + } else { + transparentImageView.image = UIImage(named: "Home_Tags_Transparent") + } // Add the UIImageView to your view hierarchy view.addSubview(transparentImageView) view.bringSubviewToFront(transparentImageView) @@ -84,11 +88,15 @@ extension HIHomeViewController { func layoutLegendButton() { view.addSubview(legendButton) - legendButton.constrain(width: 25, height: 25) - legendButton.addTarget(self, action: #selector(didSelectLegendButton(_:)), for: .touchUpInside) + if UIDevice.current.userInterfaceIdiom != .pad { + legendButton.constrain(width: 20, height: 20) + } - legendButton.topAnchor.constraint(equalTo: bannerFrameView.topAnchor).isActive = true + legendButton.translatesAutoresizingMaskIntoConstraints = false + legendButton.topAnchor.constraint(equalTo: bannerFrameView.topAnchor, constant: -2).isActive = true legendButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -15).isActive = true + + legendButton.addTarget(self, action: #selector(didSelectLegendButton(_:)), for: .touchUpInside) } func setUpCountdown() { @@ -96,7 +104,7 @@ extension HIHomeViewController { countdownFrameView.translatesAutoresizingMaskIntoConstraints = false var countdownFrameConstant: CGFloat = 1.0 if UIDevice.current.userInterfaceIdiom == .pad { - countdownFrameConstant = 1.7 + countdownFrameConstant = 1.5 } else if UIScreen.main.bounds.width < 375.0 { countdownFrameConstant = 0.9 } @@ -121,23 +129,23 @@ extension HIHomeViewController { bannerFrameView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true bannerFrameView.rightAnchor.constraint(equalTo: view.safeAreaLayoutGuide.rightAnchor).isActive = true bannerFrameView.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor).isActive = true - var bannerFrameConstant: CGFloat = 1.0 var bannerFrameTopAnchorConstant: CGFloat = 1.0 var bannerFrameHeightConstant: CGFloat = 1.0 if UIDevice.current.userInterfaceIdiom == .pad { - bannerFrameConstant = -0.5 - bannerFrameTopAnchorConstant = 1.9 - bannerFrameHeightConstant = 1.2 + bannerFrameTopAnchorConstant = 0.8 + bannerFrameHeightConstant = 1.5 } else if UIScreen.main.bounds.width < 375.0 { - bannerFrameConstant = 0.9 bannerFrameTopAnchorConstant = 0.9 bannerFrameHeightConstant = 0.9 } - bannerFrameView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: -50 * bannerFrameTopAnchorConstant).isActive = true - //let widthConstant: CGFloat = 290 - let heightConstant: CGFloat = 20 * bannerFrameHeightConstant - //bannerFrameView.widthAnchor.constraint(equalToConstant: widthConstant).isActive = true - bannerFrameView.heightAnchor.constraint(equalToConstant: heightConstant).isActive = true + + if UIDevice.current.userInterfaceIdiom == .pad { + bannerFrameView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: -20 * bannerFrameTopAnchorConstant).isActive = true + } else { + bannerFrameView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: -50 * bannerFrameTopAnchorConstant).isActive = true + } + + bannerFrameView.heightAnchor.constraint(equalToConstant: 20 * bannerFrameHeightConstant).isActive = true bannerFrameView.addSubview(bannerViewController.view) bannerViewController.view.translatesAutoresizingMaskIntoConstraints = false bannerViewController.view.topAnchor.constraint(equalTo: bannerFrameView.topAnchor).isActive = true @@ -165,47 +173,55 @@ extension HIHomeViewController { let hackEnd = HITimeDataSource.shared.eventTimes.hackEnd let projectShowcaseEnd = HITimeDataSource.shared.eventTimes.projectShowcaseEnd let closingCeremonyEnd = HITimeDataSource.shared.eventTimes.closingCeremonyEnd - + if now < checkInStart { - backgroundView.image = #imageLiteral(resourceName: "Home_Start") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_Start") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_Start") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_Start") + } } else if now < checkInEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_1") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_1") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_1") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_1") + } } else if now < scavengerHuntEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_2") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_2") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_2") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_2") + } } else if now < openingCeremonyEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_3") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_3") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_3") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_3") + } } else if now < hackEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_4") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_4") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_4") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_4") + } } else if now < projectShowcaseEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_5") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_5") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_5") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_5") + } } else if now < closingCeremonyEnd { - backgroundView.image = #imageLiteral(resourceName: "Home_6") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_6") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_6") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_6") + } } else { - backgroundView.image = #imageLiteral(resourceName: "Home_Final") - if UIDevice.current.userInterfaceIdiom == .pad { - backgroundView.image = #imageLiteral(resourceName: "Home_Final") - } + if UIDevice.current.userInterfaceIdiom == .pad { + backgroundView.image = #imageLiteral(resourceName: "iPad_Home_Final") + } else { + backgroundView.image = #imageLiteral(resourceName: "Home_Final") + } } } }