From e25f713e6ff7a83c31841f074de5883df3122dd8 Mon Sep 17 00:00:00 2001 From: Chris Trevarthen Date: Sun, 17 Mar 2019 15:10:22 -0400 Subject: [PATCH] Switch storyboard to use autolayout. Support universal devices (iPad/iPhone). --- .gitignore | 5 +- .../Coffee Timer.xcodeproj/project.pbxproj | 15 +- .../Base.lproj/MainStoryboard.storyboard | 147 ++++++++++++------ .../en.lproj/MainStoryboard.strings | 24 +++ 4 files changed, 130 insertions(+), 61 deletions(-) create mode 100644 App/Your-First-iOS-App/Coffee Timer/Coffee Timer/en.lproj/MainStoryboard.strings diff --git a/.gitignore b/.gitignore index 88ff171..e85c747 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Xcode +**/.DS_Store + # Compiled class file *.class @@ -25,4 +28,4 @@ Libs/TempTestCase*.groovy Libs/TempTestSuite*.groovy Reports settings/internal/com.kms.katalon.integration.analytics.properties -settings/internal/com.kms.katalon.integration.jira.properties \ No newline at end of file +settings/internal/com.kms.katalon.integration.jira.properties diff --git a/App/Your-First-iOS-App/Coffee Timer/Coffee Timer.xcodeproj/project.pbxproj b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer.xcodeproj/project.pbxproj index 781a4c6..e7374a6 100755 --- a/App/Your-First-iOS-App/Coffee Timer/Coffee Timer.xcodeproj/project.pbxproj +++ b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer.xcodeproj/project.pbxproj @@ -68,6 +68,7 @@ 5EA5D74F1736AADF00E729CA /* CoffeeTimer.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = CoffeeTimer.xcdatamodel; sourceTree = ""; }; 5EA5D7511736AD1500E729CA /* CTRTimerModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CTRTimerModel.h; sourceTree = ""; }; 5EA5D7521736AD1500E729CA /* CTRTimerModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTRTimerModel.m; sourceTree = ""; }; + 8317226D223E0B3400F98387 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainStoryboard.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -209,11 +210,6 @@ CLASSPREFIX = CTR; LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Ash Furrow"; - TargetAttributes = { - 5E964D7316F4DD080074FB6A = { - DevelopmentTeam = W5MH2XPH84; - }; - }; }; buildConfigurationList = 5E964D6F16F4DD080074FB6A /* Build configuration list for PBXProject "Coffee Timer" */; compatibilityVersion = "Xcode 3.2"; @@ -287,6 +283,7 @@ children = ( 5EA5D6DA17348D7A00E729CA /* Base */, 5EA5D6DB17348E3800E729CA /* fr */, + 8317226D223E0B3400F98387 /* en */, ); name = MainStoryboard.storyboard; sourceTree = ""; @@ -399,14 +396,14 @@ 5E964D9816F4DD090074FB6A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - DEVELOPMENT_TEAM = W5MH2XPH84; + DEVELOPMENT_TEAM = ""; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Coffee Timer/Coffee Timer-Prefix.pch"; INFOPLIST_FILE = "Coffee Timer/Coffee Timer-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.4; PRODUCT_BUNDLE_IDENTIFIER = "com.ashfurrow.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = 2; + TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; name = Debug; @@ -414,14 +411,14 @@ 5E964D9916F4DD090074FB6A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DEVELOPMENT_TEAM = W5MH2XPH84; + DEVELOPMENT_TEAM = ""; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Coffee Timer/Coffee Timer-Prefix.pch"; INFOPLIST_FILE = "Coffee Timer/Coffee Timer-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.4; PRODUCT_BUNDLE_IDENTIFIER = "com.ashfurrow.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = 2; + TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/Base.lproj/MainStoryboard.storyboard b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/Base.lproj/MainStoryboard.storyboard index 437b5d1..b91511a 100755 --- a/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/Base.lproj/MainStoryboard.storyboard +++ b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/Base.lproj/MainStoryboard.storyboard @@ -1,11 +1,11 @@ - - + + - + @@ -17,7 +17,7 @@ - + @@ -26,60 +26,89 @@ - + + + + + - + - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -104,26 +133,26 @@ - + - + - + - + - + + + + + - + - - - + + - + + + + + + + + + + + + @@ -210,7 +255,7 @@ - + @@ -219,7 +264,7 @@ - + @@ -228,7 +273,7 @@ - + diff --git a/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/en.lproj/MainStoryboard.strings b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/en.lproj/MainStoryboard.strings new file mode 100644 index 0000000..e574ca9 --- /dev/null +++ b/App/Your-First-iOS-App/Coffee Timer/Coffee Timer/en.lproj/MainStoryboard.strings @@ -0,0 +1,24 @@ + +/* Class = "UILabel"; text = "Minutes"; ObjectID = "5n3-kq-6zY"; */ +"5n3-kq-6zY.text" = "Minutes"; + +/* Class = "UIButton"; normalTitle = "Start"; ObjectID = "8QK-MZ-DxU"; */ +"8QK-MZ-DxU.normalTitle" = "Start"; + +/* Class = "UITextField"; placeholder = "Name of Coffee"; ObjectID = "DdR-29-iNw"; */ +"DdR-29-iNw.placeholder" = "Name of Coffee"; + +/* Class = "UILabel"; text = "Title"; ObjectID = "Gm8-fH-rP6"; */ +"Gm8-fH-rP6.text" = "Title"; + +/* Class = "UILabel"; text = "Seconds"; ObjectID = "JFJ-sP-t1h"; */ +"JFJ-sP-t1h.text" = "Seconds"; + +/* Class = "UILabel"; text = "4:00"; ObjectID = "JyD-hy-Wih"; */ +"JyD-hy-Wih.text" = "4:00"; + +/* Class = "UISegmentedControl"; YRz-5X-uQ2.segmentTitles[0] = "Coffee"; ObjectID = "YRz-5X-uQ2"; */ +"YRz-5X-uQ2.segmentTitles[0]" = "Coffee"; + +/* Class = "UISegmentedControl"; YRz-5X-uQ2.segmentTitles[1] = "Tea"; ObjectID = "YRz-5X-uQ2"; */ +"YRz-5X-uQ2.segmentTitles[1]" = "Tea";