diff --git a/ProjectClock.xcodeproj/project.pbxproj b/ProjectClock.xcodeproj/project.pbxproj
index 95840b7..5bf773f 100644
--- a/ProjectClock.xcodeproj/project.pbxproj
+++ b/ProjectClock.xcodeproj/project.pbxproj
@@ -90,11 +90,11 @@
4FF0684225A5F18700304E6B /* AccountViewController.swift */,
4FA419AE25AF93EC004CE0FC /* AlarmViewController.swift */,
4F8A607025A9160400D88DC3 /* AddAlarmViewController.swift */,
+ F0DF7C0625BCD9FC0064A26B /* StopwatchViewController.swift */,
7C83963825AF68980027A94C /* TestingViewController.swift */,
4FD642DF25B4D5F30069171E /* AlarmActivationViewController.swift */,
4FD642D225B48C380069171E /* AlarmActivator.swift */,
4FF0684425A5F18700304E6B /* Main.storyboard */,
- F0DF7C0625BCD9FC0064A26B /* StopwatchViewController.swift */,
7C83963525AF375B0027A94C /* NotificationLogic.swift */,
4F98955125A9260400F51321 /* Net.swift */,
4F509BD125AE22D100726227 /* Models.swift */,
diff --git a/ProjectClock/Base.lproj/Main.storyboard b/ProjectClock/Base.lproj/Main.storyboard
index dd71764..6ad3f66 100644
--- a/ProjectClock/Base.lproj/Main.storyboard
+++ b/ProjectClock/Base.lproj/Main.storyboard
@@ -279,46 +279,11 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -382,23 +347,46 @@
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
-
-
-
diff --git a/ProjectClock/StopwatchViewController.swift b/ProjectClock/StopwatchViewController.swift
index cfe64ec..f0724ad 100644
--- a/ProjectClock/StopwatchViewController.swift
+++ b/ProjectClock/StopwatchViewController.swift
@@ -127,3 +127,26 @@ extension StopwatchViewController: UITableViewDelegate, UITableViewDataSource {
}
}
}
+
+/**
+ Class to set relative font size for the stopwatch
+ */
+class StopwatchText: UILabel
+{
+ @IBInspectable var iPhoneFontSize: CGFloat = 0
+ {
+ didSet
+ {
+ overrideFontSize(iPhoneFontSize)
+ }
+ }
+
+ func overrideFontSize(_ fontSize: CGFloat)
+ {
+ let size = UIScreen.main.bounds.size
+ let width = UIDevice.current.orientation.isPortrait ? size.width : size.height
+
+ // ViewWidth-based font size
+ font = font.withSize(0.22 * width)
+ }
+}