From c7cf51b2adef01719f3355a6a34e460bc150a23f Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Sun, 20 Mar 2016 23:17:05 +0100 Subject: [PATCH] View updated, outsourced, working keyboard and LSK --- FMC Planner 2.xcodeproj/project.pbxproj | 14 + .../xcdebugger/Breakpoints_v2.xcbkptlist | 50 + .../AppIcon.appiconset/Contents.json | 5 + FMC Planner 2/Assets.xcassets/Contents.json | 6 + .../tri.imageset/Contents.json | 23 + .../Assets.xcassets/tri.imageset/trBig.png | Bin 0 -> 3647 bytes .../tri.imageset/triBigger.png | Bin 0 -> 3094 bytes .../Assets.xcassets/tri.imageset/triSmall.png | Bin 0 -> 2891 bytes .../Base.lproj/LaunchScreen.storyboard | 6 +- FMC Planner 2/Base.lproj/Main.storyboard | 1215 +++++++---------- FMC Planner 2/ViewController.h | 18 +- FMC Planner 2/ViewController.m | 83 +- FMC Planner 2/ViewControllerKeyboard.h | 25 + FMC Planner 2/ViewControllerKeyboard.m | 73 + FMC Planner 2/ViewControllerScreen.h | 22 + FMC Planner 2/ViewControllerScreen.m | 95 ++ 16 files changed, 846 insertions(+), 789 deletions(-) create mode 100644 FMC Planner 2/Assets.xcassets/Contents.json create mode 100644 FMC Planner 2/Assets.xcassets/tri.imageset/Contents.json create mode 100644 FMC Planner 2/Assets.xcassets/tri.imageset/trBig.png create mode 100644 FMC Planner 2/Assets.xcassets/tri.imageset/triBigger.png create mode 100644 FMC Planner 2/Assets.xcassets/tri.imageset/triSmall.png create mode 100644 FMC Planner 2/ViewControllerKeyboard.h create mode 100644 FMC Planner 2/ViewControllerKeyboard.m create mode 100644 FMC Planner 2/ViewControllerScreen.h create mode 100644 FMC Planner 2/ViewControllerScreen.m diff --git a/FMC Planner 2.xcodeproj/project.pbxproj b/FMC Planner 2.xcodeproj/project.pbxproj index aa0ad9c..fd6cb5c 100644 --- a/FMC Planner 2.xcodeproj/project.pbxproj +++ b/FMC Planner 2.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + E227C7831C9F42AB00DE0CA4 /* ViewControllerKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = E227C7821C9F42AB00DE0CA4 /* ViewControllerKeyboard.m */; }; + E227C7861C9F474100DE0CA4 /* ViewControllerScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = E227C7851C9F474100DE0CA4 /* ViewControllerScreen.m */; }; E22EE9D11C9DB7B3001F5BC0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E22EE9D01C9DB7B3001F5BC0 /* main.m */; }; E22EE9D41C9DB7B3001F5BC0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E22EE9D31C9DB7B3001F5BC0 /* AppDelegate.m */; }; E22EE9D71C9DB7B3001F5BC0 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E22EE9D61C9DB7B3001F5BC0 /* ViewController.m */; }; @@ -35,6 +37,10 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + E227C7811C9F42AB00DE0CA4 /* ViewControllerKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewControllerKeyboard.h; sourceTree = ""; }; + E227C7821C9F42AB00DE0CA4 /* ViewControllerKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewControllerKeyboard.m; sourceTree = ""; }; + E227C7841C9F474100DE0CA4 /* ViewControllerScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewControllerScreen.h; sourceTree = ""; }; + E227C7851C9F474100DE0CA4 /* ViewControllerScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewControllerScreen.m; sourceTree = ""; }; E22EE9CC1C9DB7B3001F5BC0 /* FMC Planner 2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "FMC Planner 2.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E22EE9D01C9DB7B3001F5BC0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; E22EE9D21C9DB7B3001F5BC0 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -110,6 +116,10 @@ E22EE9DD1C9DB7B3001F5BC0 /* LaunchScreen.storyboard */, E22EE9E01C9DB7B3001F5BC0 /* Info.plist */, E22EE9CF1C9DB7B3001F5BC0 /* Supporting Files */, + E227C7811C9F42AB00DE0CA4 /* ViewControllerKeyboard.h */, + E227C7821C9F42AB00DE0CA4 /* ViewControllerKeyboard.m */, + E227C7841C9F474100DE0CA4 /* ViewControllerScreen.h */, + E227C7851C9F474100DE0CA4 /* ViewControllerScreen.m */, ); path = "FMC Planner 2"; sourceTree = ""; @@ -276,6 +286,8 @@ E22EE9D71C9DB7B3001F5BC0 /* ViewController.m in Sources */, E22EE9D41C9DB7B3001F5BC0 /* AppDelegate.m in Sources */, E22EE9D11C9DB7B3001F5BC0 /* main.m in Sources */, + E227C7831C9F42AB00DE0CA4 /* ViewControllerKeyboard.m in Sources */, + E227C7861C9F474100DE0CA4 /* ViewControllerScreen.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -418,6 +430,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = "FMC Planner 2/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.weebly.alikja.FMC-Planner-2"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -431,6 +444,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = "FMC Planner 2/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.weebly.alikja.FMC-Planner-2"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/FMC Planner 2.xcodeproj/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/FMC Planner 2.xcodeproj/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index fe2b454..89fcce2 100644 --- a/FMC Planner 2.xcodeproj/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/FMC Planner 2.xcodeproj/xcuserdata/Kili2.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,4 +2,54 @@ + + + + + + + + + + + + + + diff --git a/FMC Planner 2/Assets.xcassets/AppIcon.appiconset/Contents.json b/FMC Planner 2/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..eeea76c 100644 --- a/FMC Planner 2/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/FMC Planner 2/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -59,6 +59,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/FMC Planner 2/Assets.xcassets/Contents.json b/FMC Planner 2/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/FMC Planner 2/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/FMC Planner 2/Assets.xcassets/tri.imageset/Contents.json b/FMC Planner 2/Assets.xcassets/tri.imageset/Contents.json new file mode 100644 index 0000000..3a9c069 --- /dev/null +++ b/FMC Planner 2/Assets.xcassets/tri.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "filename" : "triSmall.png", + "scale" : "1x" + }, + { + "idiom" : "iphone", + "filename" : "trBig.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "filename" : "triBigger.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/FMC Planner 2/Assets.xcassets/tri.imageset/trBig.png b/FMC Planner 2/Assets.xcassets/tri.imageset/trBig.png new file mode 100644 index 0000000000000000000000000000000000000000..220422172701850f2841644de932439b28fe50da GIT binary patch literal 3647 zcmV-F4#4q=P)o%000cxX+uL$Nkc;* zaB^>EX>4Tx09eDVR|i;A$rhellF$-*Z=oa2fYPNzY5?g)5S17L34{<+5D*)(xPogJ z3ziiXMOo|!EH*4ySUX@}&_zL67gw=id6Q7YvafvKyZMIu-#O>ZsdHukK$XK32zV#} zAd4>+21U~oCnqLRNq2!9&<4uD0Vp$BA^|-zG7Pc+em0*CzIk4?0Yv(~ZZBO6{BI8- zl`Uey_X#-iQbnvR0FVg)kh)m{p%?&pb2x7{ODvG$V2Cv`W25~bP6j|uX-HQ37zeTW zY$2CL4H7c*s6ouEEGE^-!HF6v%ueI-*x>*EWbq^;y5Ud~WyXZUw*$1lD3$3i#cmKE zU@-$?hVYXdZhSbzz5t-60`bIXh(jQrA<2xRLu?0eb(%0R4q|VJZ*nBTQam02Oe>!g zn*gy9#3B3{;SmsfK+Iu@{E{HHhPZ;mW=Qh{V}@PeiW#vGLw(pYVRp2X-v$7DLMq!o zU~nE!%ghdy+F%OtAyH0Dz_88v9KY~EU3gmtGb9pXONd{xc|p;G>k#w=;z;S5@SEVz z=Y@w2`b8*Xi)8-7Z$g`x6D!S`697b0u`o7z&^BUh8aI#uaUjIG9AR+upufap0-mhS zU`&Ybg_7vFK_5whY<`?{O=(@sX9@#?24h8P1n~$Hut7GM0spc9A9MmL5CJa8k)d?J z1X*xUp#^qu1VJu7974z;0+})nA?O;R4@*d81dx&q(jX@f$_>v_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V0GgZ_00007 zbV*G`2jBw~4l)hf6b}3V001UwR9JLFZ*6U5Zgc_CX>@2HM@dak zAa8CUVIWOmW0mAzTL1t6xk*GpR7l6gmP-zRAPhu1livTzx-bNhUpp*xqXI9l3bfdD znS9}a0R`rB)BG$C3XT@ah0pdi=jXQ}gJV267Cy(#F+Wzrc7CopcYdzB*Ek|yHw&MU zA2SmmKCiu>@g>n~m|2cr9QoZ;!)JaYRvncjP;lru48TbOq}eYp;3_Da%S^kzMAGJV zbGQno%%ggdEAEwt3p&U{eZv&R}&!IxP(O4&&cy8-2XE@0Xm RS5N=|002ovPDHLkV1kVG;)wtN literal 0 HcmV?d00001 diff --git a/FMC Planner 2/Assets.xcassets/tri.imageset/triBigger.png b/FMC Planner 2/Assets.xcassets/tri.imageset/triBigger.png new file mode 100644 index 0000000000000000000000000000000000000000..a6fa4d7508d9fc8247438e28959b650c5fa1843c GIT binary patch literal 3094 zcmV+x4C(WUP)P000UvX+uL$Nkc;* zaB^>EX>4Tx07%E3mUmQC*A|D*y?1({%`nm#dXp|Nfb=dP9RyJrW(F9_0K*JTY>22p zL=h1IMUbF?0i&TvtcYSED5zi$NDxqBFp8+CWJcCXe0h2A<>mLsz2Dkr?{oLrd!Mx~ z03=TzE-wX^0w9?u;0Jm*(^rK@(6Rjh26%u0rT{Qm>8ZX!?!iDLFE@L0LWj&=4?(nOT_siPRbOditRHZrp6?S8AgejFG^6va$=5K z|`EW#NwP&*~x4%_lS6VhL9s-#7D#h8C*`Lh;NHnGf9}t74chfY%+(L z4giWIwhK6{coCb3n8XhbbP@4#0C1$ZFF5847I3lz;zPNlq-OKEaq$AWE=!MYYHiJ+ zdvY?9I0Av8Ka-Wn(gPeepdb@piwLhwjRWWeSr7baCBSDM=|pK0Q5^$>Pur z|2)M1IPkCYSQ^NQ`z*pYmq4Rp8z$= z2uR(a0_5jDfT9oq5_wSE_22vEgAWDbn-``!u{igi1^xT3aEbVl&W-yV=Mor9X9@Wk zi)-R*3DAH5Bmou30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U1@Q#ce4LsV@ zXw}%*q|{W>3^xm#r;bG)yZMdlH=QkpEw!z*)}rI!xbXP1Z==5*I^lhy`y}IJ%XeDe zRku;v3frOf?DmPgz@Xmo#D^7KH*><&kZ}k0<(`u)y&d8oAIZHU3e|F(q&bit1 zspqFJ#9bKcj_Q7Jan;4!Jpn!am%J}sx$J)VVy{#0xhr;8PG7aTdg>bETE}(E>+O9O zeQiHj{Lt2K+24M{>PF{H>ziEz%LmR5It*U8<$CM#ZLizc@2tEtFcdO$cQ|r*xkvZnNio#z9&IX9*nWZp8u5o(}(f= zr{t&Q6RH!9lV+2rr`)G*K3n~4{CVp0`RRh6rGKt|q5I;yUmSnwn^`q8{*wQ4;n(6< z@~@7(UiP|s)_?Z#o8&k1bA@l^-yVI(c-Q+r?ES=i<_GMDijR69yFPh;dbp6hu<#rA zg!B8%JG^WF000JJOGiWi{{a60|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQ zO+^Rb0~8K25>^}o2><{9CTUbybVF}#ZDnqB0000007G(RVRU6=Aa`kWXdp*PO;8|j zZXjVGO<`k|9=00A~hL_t(&-qo5(5`!=d1T|Cs|Ch-%MF@+Lk*`Hgw0WV39jDii_fZI%G7a{2e zTn=3|D=?g3%S?C7xeO=RRMXw_h{Fl?wds|U`g8++oE|C*Rp}<^TWy literal 0 HcmV?d00001 diff --git a/FMC Planner 2/Assets.xcassets/tri.imageset/triSmall.png b/FMC Planner 2/Assets.xcassets/tri.imageset/triSmall.png new file mode 100644 index 0000000000000000000000000000000000000000..fe31060e6d25825f7e9c1abd520bf9982f9be9d8 GIT binary patch literal 2891 zcmV-R3$*l!P)EX>4Tx07%E3mUmQC*A|D*y?1({%`nm#dXp|Nfb=dP9RyJrW(F9_0K*JTY>22p zL=h1IMUbF?0i&TvtcYSED5zi$NDxqBFp8+CWJcCXe0h2A<>mLsz2Dkr?{oLrd!Mx~ z03=TzE-wX^0w9?u;0Jm*(^rK@(6Rjh26%u0rT{Qm>8ZX!?!iDLF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ZHhT+o^xV|+NSFf6ii-K_us002ovPDHLkV1nZ(Z+QR! literal 0 HcmV?d00001 diff --git a/FMC Planner 2/Base.lproj/LaunchScreen.storyboard b/FMC Planner 2/Base.lproj/LaunchScreen.storyboard index 2e721e1..90d6157 100644 --- a/FMC Planner 2/Base.lproj/LaunchScreen.storyboard +++ b/FMC Planner 2/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -15,7 +16,6 @@ - diff --git a/FMC Planner 2/Base.lproj/Main.storyboard b/FMC Planner 2/Base.lproj/Main.storyboard index 966e144..01ddbc7 100644 --- a/FMC Planner 2/Base.lproj/Main.storyboard +++ b/FMC Planner 2/Base.lproj/Main.storyboard @@ -3,7 +3,7 @@ - + @@ -18,714 +18,535 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FMC Planner 2/ViewController.h b/FMC Planner 2/ViewController.h index 2cffaf2..69da1b3 100644 --- a/FMC Planner 2/ViewController.h +++ b/FMC Planner 2/ViewController.h @@ -6,27 +6,17 @@ // Copyright © 2016 Kilian Hofmann. All rights reserved. // +#import "ViewControllerKeyboard.h" +#import "ViewControllerScreen.h" #import @interface ViewController : UIViewController -@property(nonatomic) BOOL alphaOn; - -@property(strong, nonatomic) NSArray *alphabet; -@property(strong, nonatomic) NSArray *numeric; - -@property(strong, nonatomic) IBOutletCollection(UIButton) NSArray *Keys; - @property(strong, nonatomic) IBOutlet UIView *backdropKeys; @property(strong, nonatomic) IBOutlet UIView *backdropScreen; -@property(strong, nonatomic) IBOutletCollection(UILabel) NSArray *ScreenLabels; - -@property(strong, nonatomic) IBOutlet UILabel *Scratchpad; - -@property(strong, nonatomic) IBOutlet UILabel *Header; - -- (IBAction)KeyTaps:(UIButton *)sender; +@property(strong, nonatomic) ViewControllerScreen *screen; +@property(strong, nonatomic) ViewControllerKeyboard *keys; @end diff --git a/FMC Planner 2/ViewController.m b/FMC Planner 2/ViewController.m index 04febf1..0d4473b 100644 --- a/FMC Planner 2/ViewController.m +++ b/FMC Planner 2/ViewController.m @@ -13,89 +13,22 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. - _alphaOn = true; - _alphabet = [[NSArray alloc] - initWithObjects:@"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", - @"J", @"K", @"L", @"M", @"N", @"O", @"P", @"Q", @"R", - @"S", @"T", @"U", @"V", @"W", @"X", @"Y", @"Z", @"SP", - @"CLR", @"DEL", @"NUM", nil]; - _numeric = [[NSArray alloc] - initWithObjects:@"1", @"2", @"3", @"", @"", @"", @"4", @"5", @"6", - @"", @"", @"", @"7", @"8", @"9", @"", @"", @"", - @".", @"0", @"/", @"", @"", @"", @"", @"", @"SP", - @"CLR", @"DEL", @"LET", nil]; - // Round corners _backdropKeys.layer.cornerRadius = 5; _backdropKeys.layer.masksToBounds = YES; _backdropScreen.layer.cornerRadius = 5; _backdropScreen.layer.masksToBounds = YES; - for (UIButton *but in _Keys) { - but.layer.cornerRadius = 5; - but.layer.masksToBounds = YES; - } - // Set Font Size - if (self.view.frame.size.height == 480) { - for (UILabel *label in _ScreenLabels) { - label.font = [UIFont systemFontOfSize:14]; - } - _Header.font = [UIFont systemFontOfSize:14]; - _Scratchpad.font = [UIFont systemFontOfSize:14]; - } - - // Init Start Page - [self clearScreen]; - _Header.text = @"START"; - _Scratchpad.text = @""; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -- (IBAction)KeyTaps:(UIButton *)sender { - if ([sender.restorationIdentifier isEqualToString:@"Switch"]) { - _alphaOn = !_alphaOn; - [self switchKeyboard]; - } else if ([sender.restorationIdentifier isEqualToString:@"Space"]) { - _Scratchpad.text = [_Scratchpad.text stringByAppendingString:@" "]; - } else if ([sender.restorationIdentifier isEqualToString:@"Clear"]) { - if ([_Scratchpad.text isEqualToString:@"DELETE"]) { - _Scratchpad.text = @""; - } else if (_Scratchpad.text.length > 0) { - _Scratchpad.text = - [_Scratchpad.text substringToIndex:[_Scratchpad.text length] - 1]; - } - } else if ([sender.restorationIdentifier isEqualToString:@"Delete"]) { - _Scratchpad.text = @"DELETE"; - } else { - _Scratchpad.text = - [_Scratchpad.text stringByAppendingString:sender.titleLabel.text]; +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + NSString *segueName = segue.identifier; + if ([segueName isEqualToString:@"keyboard"]) { + _keys = (ViewControllerKeyboard *)[segue destinationViewController]; + _keys.main = self; } -} - -- (void)clearScreen { - for (UILabel *label in _ScreenLabels) { - label.text = @""; - } - _Scratchpad.text = @""; - _Header.text = @""; -} - -- (void)switchKeyboard { - if (_alphaOn) { - for (int i = 0; i < _Keys.count; i++) { - [((UIButton *)_Keys[i]) setTitle:_alphabet[i] - forState:UIControlStateNormal]; - [((UIButton *)_Keys[i]).titleLabel sizeToFit]; - } - } else { - for (int i = 0; i < _Keys.count; i++) { - [((UIButton *)_Keys[i]) setTitle:_numeric[i] - forState:UIControlStateNormal]; - [((UIButton *)_Keys[i]).titleLabel sizeToFit]; - } + if ([segueName isEqualToString:@"screen"]) { + _screen = (ViewControllerScreen *)[segue destinationViewController]; + _screen.main = self; } } diff --git a/FMC Planner 2/ViewControllerKeyboard.h b/FMC Planner 2/ViewControllerKeyboard.h new file mode 100644 index 0000000..1343f55 --- /dev/null +++ b/FMC Planner 2/ViewControllerKeyboard.h @@ -0,0 +1,25 @@ +// +// ViewControllerKeyboard.h +// FMC Planner 2 +// +// Created by Kilian Hofmann on 20.03.16. +// Copyright © 2016 Kilian Hofmann. All rights reserved. +// + +#import + +@class ViewController; +@interface ViewControllerKeyboard : UIViewController + +@property(nonatomic) BOOL alphaOn; + +@property(strong, nonatomic) NSArray *alphabet; +@property(strong, nonatomic) NSArray *numeric; + +@property(strong, nonatomic) IBOutletCollection(UIButton) NSArray *Keys; + +@property(strong, nonatomic) ViewController *main; + +- (IBAction)KeyTaps:(UIButton *)sender; + +@end diff --git a/FMC Planner 2/ViewControllerKeyboard.m b/FMC Planner 2/ViewControllerKeyboard.m new file mode 100644 index 0000000..dfc931f --- /dev/null +++ b/FMC Planner 2/ViewControllerKeyboard.m @@ -0,0 +1,73 @@ +// +// ViewControllerKeyboard.m +// FMC Planner 2 +// +// Created by Kilian Hofmann on 20.03.16. +// Copyright © 2016 Kilian Hofmann. All rights reserved. +// + +#import "ViewController.h" +#import "ViewControllerKeyboard.h" + +@implementation ViewControllerKeyboard + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + _alphaOn = true; + _alphabet = [[NSArray alloc] + initWithObjects:@"A", @"B", @"C", @"D", @"E", @"F", @"G", @"H", @"I", + @"J", @"K", @"L", @"M", @"N", @"O", @"P", @"Q", @"R", + @"S", @"T", @"U", @"V", @"W", @"X", @"Y", @"Z", @"SP", + @"CLR", @"DEL", @"NUM", nil]; + _numeric = [[NSArray alloc] + initWithObjects:@"1", @"2", @"3", @"", @"", @"", @"4", @"5", @"6", + @"", @"", @"", @"7", @"8", @"9", @"", @"", @"", + @".", @"0", @"/", @"", @"", @"", @"", @"", @"SP", + @"CLR", @"DEL", @"LET", nil]; + // Round button corners + for (UIButton *but in _Keys) { + but.layer.cornerRadius = 5; + but.layer.masksToBounds = YES; + } +} + +- (IBAction)KeyTaps:(UIButton *)sender { + if ([sender.restorationIdentifier isEqualToString:@"Switch"]) { + _alphaOn = !_alphaOn; + [self switchKeyboard]; + } else if ([sender.restorationIdentifier isEqualToString:@"Space"]) { + _main.screen.Scratchpad.text = + [_main.screen.Scratchpad.text stringByAppendingString:@" "]; + } else if ([sender.restorationIdentifier isEqualToString:@"Clear"]) { + if ([_main.screen.Scratchpad.text isEqualToString:@"DELETE"]) { + _main.screen.Scratchpad.text = @""; + } else if (_main.screen.Scratchpad.text.length > 0) { + _main.screen.Scratchpad.text = [_main.screen.Scratchpad.text + substringToIndex:[_main.screen.Scratchpad.text length] - 1]; + } + } else if ([sender.restorationIdentifier isEqualToString:@"Delete"]) { + _main.screen.Scratchpad.text = @"DELETE"; + } else { + _main.screen.Scratchpad.text = [_main.screen.Scratchpad.text + stringByAppendingString:sender.titleLabel.text]; + } +} + +- (void)switchKeyboard { + if (_alphaOn) { + for (int i = 0; i < _Keys.count; i++) { + [((UIButton *)_Keys[i]) setTitle:_alphabet[i] + forState:UIControlStateNormal]; + [((UIButton *)_Keys[i]).titleLabel sizeToFit]; + } + } else { + for (int i = 0; i < _Keys.count; i++) { + [((UIButton *)_Keys[i]) setTitle:_numeric[i] + forState:UIControlStateNormal]; + [((UIButton *)_Keys[i]).titleLabel sizeToFit]; + } + } +} + +@end diff --git a/FMC Planner 2/ViewControllerScreen.h b/FMC Planner 2/ViewControllerScreen.h new file mode 100644 index 0000000..509ad7c --- /dev/null +++ b/FMC Planner 2/ViewControllerScreen.h @@ -0,0 +1,22 @@ +// +// ViewControllerScreen.h +// FMC Planner 2 +// +// Created by Kilian Hofmann on 20.03.16. +// Copyright © 2016 Kilian Hofmann. All rights reserved. +// + +#import + +@class ViewController; +@interface ViewControllerScreen : UIViewController + +@property(strong, nonatomic) IBOutletCollection(UILabel) NSArray *LSK; + +@property(strong, nonatomic) IBOutlet UILabel *Scratchpad; + +@property(strong, nonatomic) IBOutlet UILabel *Header; + +@property(strong, nonatomic) ViewController *main; + +@end diff --git a/FMC Planner 2/ViewControllerScreen.m b/FMC Planner 2/ViewControllerScreen.m new file mode 100644 index 0000000..a8965cd --- /dev/null +++ b/FMC Planner 2/ViewControllerScreen.m @@ -0,0 +1,95 @@ +// +// ViewControllerScreen.m +// FMC Planner 2 +// +// Created by Kilian Hofmann on 20.03.16. +// Copyright © 2016 Kilian Hofmann. All rights reserved. +// + +#import "ViewControllerScreen.h" + +@implementation ViewControllerScreen + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + // Init Start Page + [self clearScreen]; + _Header.text = @"START"; + _Scratchpad.text = @""; + + // Tap gesture shit and fitToSize + for (UILabel *label in _LSK) { + label.font = [self findAdaptiveFontForUILabelSize:label.frame.size + withMinimumSize:21]; + label.adjustsFontSizeToFitWidth = YES; + label.userInteractionEnabled = YES; + UITapGestureRecognizer *reg = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(enterLSK:)]; + [reg setNumberOfTapsRequired:1]; + [reg setNumberOfTouchesRequired:1]; + [label addGestureRecognizer:reg]; + } + _Header.font = [self findAdaptiveFontForUILabelSize:_Header.frame.size + withMinimumSize:21]; + _Header.adjustsFontSizeToFitWidth = YES; + _Scratchpad.font = [self findAdaptiveFontForUILabelSize:_Scratchpad.frame.size + withMinimumSize:21]; + _Scratchpad.adjustsFontSizeToFitWidth = YES; +} + +- (void)clearScreen { + for (UILabel *label in _LSK) { + label.text = @""; + } + _Scratchpad.text = @""; + _Header.text = @""; +} + +- (void)enterLSK:(UITapGestureRecognizer *)tapReg { + if ([_Scratchpad.text isEqualToString:@"DELETE"]) { + ((UILabel *)tapReg.view).text = @""; + } else { + ((UILabel *)tapReg.view).text = _Scratchpad.text; + } + _Scratchpad.text = @""; +} + +- (UIFont *)findAdaptiveFontForUILabelSize:(CGSize)labelSize + withMinimumSize:(NSInteger)minSize { + UIFont *tempFont = nil; + NSString *testString = + @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + NSInteger tempMin = minSize; + NSInteger tempMax = 256; + NSInteger mid = 0; + NSInteger difference = 0; + + while (tempMin <= tempMax) { + mid = tempMin + (tempMax - tempMin) / 2; + tempFont = [UIFont systemFontOfSize:mid]; + difference = labelSize.height - [testString sizeWithFont:tempFont].height; + + if (mid == tempMin || mid == tempMax) { + if (difference < 0) { + return [UIFont systemFontOfSize:(mid - 1)]; + } + + return [UIFont systemFontOfSize:mid]; + } + + if (difference < 0) { + tempMax = mid - 1; + } else if (difference > 0) { + tempMin = mid + 1; + } else { + return [UIFont systemFontOfSize:mid]; + } + } + + return [UIFont systemFontOfSize:mid]; +} + +@end