From fb03ca770200c558e320f33ecf6604f3bbe5ab8f Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Fri, 8 Jan 2021 17:51:42 -0500 Subject: [PATCH] [F] Fix scroll view scrolling --- ProjectClock.xcodeproj/project.pbxproj | 4 + ProjectClock/AddAlarmViewController.swift | 28 +++ ProjectClock/Base.lproj/Main.storyboard | 280 ++++++++++++---------- 3 files changed, 190 insertions(+), 122 deletions(-) create mode 100644 ProjectClock/AddAlarmViewController.swift diff --git a/ProjectClock.xcodeproj/project.pbxproj b/ProjectClock.xcodeproj/project.pbxproj index 665d42c..d952426 100644 --- a/ProjectClock.xcodeproj/project.pbxproj +++ b/ProjectClock.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 4F8A607125A9160400D88DC3 /* AddAlarmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F8A607025A9160400D88DC3 /* AddAlarmViewController.swift */; }; 4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0683E25A5F18700304E6B /* AppDelegate.swift */; }; 4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684025A5F18700304E6B /* SceneDelegate.swift */; }; 4FF0684325A5F18700304E6B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684225A5F18700304E6B /* ViewController.swift */; }; @@ -16,6 +17,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 4F8A607025A9160400D88DC3 /* AddAlarmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAlarmViewController.swift; sourceTree = ""; }; 4FF0683B25A5F18700304E6B /* ProjectClock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectClock.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4FF0683E25A5F18700304E6B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 4FF0684025A5F18700304E6B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -60,6 +62,7 @@ 4FF0684025A5F18700304E6B /* SceneDelegate.swift */, 4FF0684225A5F18700304E6B /* ViewController.swift */, 4FF0684425A5F18700304E6B /* Main.storyboard */, + 4F8A607025A9160400D88DC3 /* AddAlarmViewController.swift */, 4FF0684725A5F18800304E6B /* Assets.xcassets */, 4FF0684925A5F18800304E6B /* LaunchScreen.storyboard */, 4FF0684C25A5F18800304E6B /* Info.plist */, @@ -137,6 +140,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4F8A607125A9160400D88DC3 /* AddAlarmViewController.swift in Sources */, 4FF0684325A5F18700304E6B /* ViewController.swift in Sources */, 4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */, 4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */, diff --git a/ProjectClock/AddAlarmViewController.swift b/ProjectClock/AddAlarmViewController.swift new file mode 100644 index 0000000..f577d95 --- /dev/null +++ b/ProjectClock/AddAlarmViewController.swift @@ -0,0 +1,28 @@ +// +// AddAlarmViewController.swift +// ProjectClock +// +// Created by Hykilpikonna on 1/8/21. +// + +import UIKit + +class AddAlarmViewController: UIViewController +{ + @IBOutlet weak var scrollView: UIScrollView! + @IBOutlet weak var scrollViewInner: UIView! + + @IBOutlet weak var timePicker: UIDatePicker! + @IBOutlet weak var wvmPicker: UIPickerView! + + override func viewDidLayoutSubviews() + { + scrollView.addSubview(scrollViewInner) + scrollView.contentSize = scrollViewInner.frame.size + } + + override func viewDidLoad() + { + super.viewDidLoad() + } +} diff --git a/ProjectClock/Base.lproj/Main.storyboard b/ProjectClock/Base.lproj/Main.storyboard index bd971c2..14b9037 100644 --- a/ProjectClock/Base.lproj/Main.storyboard +++ b/ProjectClock/Base.lproj/Main.storyboard @@ -223,7 +223,7 @@ - + @@ -297,157 +297,193 @@ - - + + - - + + - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - +