diff --git a/Example/Parallax/Parallax.xcodeproj/project.pbxproj b/Example/Parallax/Parallax.xcodeproj/project.pbxproj index 5ca2f7c..bb57435 100644 --- a/Example/Parallax/Parallax.xcodeproj/project.pbxproj +++ b/Example/Parallax/Parallax.xcodeproj/project.pbxproj @@ -346,6 +346,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -360,6 +361,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; diff --git a/Example/Parallax/Parallax/ViewController.swift b/Example/Parallax/Parallax/ViewController.swift index 4601615..574d304 100644 --- a/Example/Parallax/Parallax/ViewController.swift +++ b/Example/Parallax/Parallax/ViewController.swift @@ -73,7 +73,8 @@ class ViewController: PresentationController { // MARK: - Configuration func configureSlides() { - let font = UIFont(name: "HelveticaNeue", size: 34.0)! + let ratio: CGFloat = UIDevice.current.userInterfaceIdiom == .pad ? 1 : 0.6 + let font = UIFont(name: "HelveticaNeue", size: 34.0 * ratio)! let color = UIColor(hex: "FFE8A9") let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = NSTextAlignment.center @@ -87,7 +88,7 @@ class ViewController: PresentationController { "The term is derived from the Greek word παράλλαξις (parallaxis), meaning 'alteration'.", "Nearby objects have a larger parallax than more distant objects when observed from different positions.", "http://en.wikipedia.org/wiki/Parallax"].map { title -> Content in - let label = UILabel(frame: CGRect(x: 0, y: 0, width: 550, height: 200)) + let label = UILabel(frame: CGRect(x: 0, y: 0, width: 550 * ratio, height: 200 * ratio)) label.numberOfLines = 5 label.attributedText = NSAttributedString(string: title, attributes: attributes) let position = Position(left: 0.7, top: 0.35) diff --git a/Example/Tutorial/Tutorial.xcodeproj/project.pbxproj b/Example/Tutorial/Tutorial.xcodeproj/project.pbxproj index 3a6ef55..02e95d9 100644 --- a/Example/Tutorial/Tutorial.xcodeproj/project.pbxproj +++ b/Example/Tutorial/Tutorial.xcodeproj/project.pbxproj @@ -332,7 +332,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Tutorial; SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = 2; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -347,7 +347,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Tutorial; SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = 2; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; diff --git a/Example/Tutorial/Tutorial/AppDelegate.swift b/Example/Tutorial/Tutorial/AppDelegate.swift index c2e6251..25832cd 100644 --- a/Example/Tutorial/Tutorial/AppDelegate.swift +++ b/Example/Tutorial/Tutorial/AppDelegate.swift @@ -70,7 +70,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } func configureSlides() { - let font = UIFont(name: "ArialRoundedMTBold", size: 42.0)! + let ratio: CGFloat = UIDevice.current.userInterfaceIdiom == .pad ? 1 : 0.4 + let font = UIFont(name: "ArialRoundedMTBold", size: 42.0 * ratio)! let color = UIColor.white let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = .center