Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial Commit

  • Loading branch information...
commit 46ab07209f0516e141bc8096183d626123066e05 1 parent bc1bc41
Kieran authored
Showing with 1,585 additions and 0 deletions.
  1. BIN  .DS_Store
  2. +535 −0 KLNoteViewController.xcodeproj/project.pbxproj
  3. +7 −0 KLNoteViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  4. BIN  ...ntroller.xcodeproj/project.xcworkspace/xcuserdata/kieranlafferty.xcuserdatad/UserInterfaceState.xcuserstate
  5. +10 −0 ...Controller.xcodeproj/project.xcworkspace/xcuserdata/kieranlafferty.xcuserdatad/WorkspaceSettings.xcsettings
  6. +5 −0 KLNoteViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  7. +96 −0 KLNoteViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcschemes/KLNoteViewController.xcscheme
  8. +27 −0 KLNoteViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcschemes/xcschememanagement.plist
  9. BIN  KLNoteViewController/.DS_Store
  10. BIN  KLNoteViewController/Default-568h@2x.png
  11. BIN  KLNoteViewController/Default.png
  12. BIN  KLNoteViewController/Default@2x.png
  13. +15 −0 KLNoteViewController/KLAppDelegate.h
  14. +63 −0 KLNoteViewController/KLAppDelegate.m
  15. +49 −0 KLNoteViewController/KLNoteViewController-Info.plist
  16. +14 −0 KLNoteViewController/KLNoteViewController-Prefix.pch
  17. +80 −0 KLNoteViewController/KLNoteViewController.h
  18. +408 −0 KLNoteViewController/KLNoteViewController.m
  19. +14 −0 KLNoteViewController/KLViewController.h
  20. +64 −0 KLNoteViewController/KLViewController.m
  21. +36 −0 KLNoteViewController/NavigationControllerData.plist
  22. BIN  KLNoteViewController/background-dark-gray-tex.png
  23. BIN  KLNoteViewController/background-dark-gray-tex@2x.png
  24. BIN  KLNoteViewController/bar-mid.png
  25. BIN  KLNoteViewController/bar-mid@2x.png
  26. +2 −0  KLNoteViewController/en.lproj/InfoPlist.strings
  27. +37 −0 KLNoteViewController/en.lproj/MainStoryboard_iPad.storyboard
  28. +36 −0 KLNoteViewController/en.lproj/MainStoryboard_iPhone.storyboard
  29. +18 −0 KLNoteViewController/main.m
  30. BIN  KLNoteViewController/premium-header-mid-skinny.png
  31. BIN  KLNoteViewController/premium-header-mid-skinny@2x.png
  32. +22 −0 KLNoteViewControllerTests/KLNoteViewControllerTests-Info.plist
  33. +13 −0 KLNoteViewControllerTests/KLNoteViewControllerTests.h
  34. +32 −0 KLNoteViewControllerTests/KLNoteViewControllerTests.m
  35. +2 −0  KLNoteViewControllerTests/en.lproj/InfoPlist.strings
BIN  .DS_Store
View
Binary file not shown
535 KLNoteViewController.xcodeproj/project.pbxproj
View
@@ -0,0 +1,535 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 7740B0831692483E00449E10 /* background-dark-gray-tex.png in Resources */ = {isa = PBXBuildFile; fileRef = 7740B0811692483E00449E10 /* background-dark-gray-tex.png */; };
+ 7740B0841692483E00449E10 /* background-dark-gray-tex@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7740B0821692483E00449E10 /* background-dark-gray-tex@2x.png */; };
+ 7740B087169248D200449E10 /* NavigationControllerData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7740B086169248D200449E10 /* NavigationControllerData.plist */; };
+ 7740B08916924C6600449E10 /* premium-header-mid-skinny.png in Resources */ = {isa = PBXBuildFile; fileRef = 7740B08816924C6600449E10 /* premium-header-mid-skinny.png */; };
+ 7740B08B16924DA100449E10 /* premium-header-mid-skinny@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7740B08A16924DA100449E10 /* premium-header-mid-skinny@2x.png */; };
+ 7797ED24168F8E0A00CB59EA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED23168F8E0A00CB59EA /* UIKit.framework */; };
+ 7797ED26168F8E0A00CB59EA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED25168F8E0A00CB59EA /* Foundation.framework */; };
+ 7797ED28168F8E0A00CB59EA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED27168F8E0A00CB59EA /* CoreGraphics.framework */; };
+ 7797ED2E168F8E0A00CB59EA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED2C168F8E0A00CB59EA /* InfoPlist.strings */; };
+ 7797ED30168F8E0A00CB59EA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED2F168F8E0A00CB59EA /* main.m */; };
+ 7797ED34168F8E0A00CB59EA /* KLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED33168F8E0A00CB59EA /* KLAppDelegate.m */; };
+ 7797ED36168F8E0A00CB59EA /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED35168F8E0A00CB59EA /* Default.png */; };
+ 7797ED38168F8E0A00CB59EA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED37168F8E0A00CB59EA /* Default@2x.png */; };
+ 7797ED3A168F8E0A00CB59EA /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED39168F8E0A00CB59EA /* Default-568h@2x.png */; };
+ 7797ED3D168F8E0A00CB59EA /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED3B168F8E0A00CB59EA /* MainStoryboard_iPhone.storyboard */; };
+ 7797ED40168F8E0A00CB59EA /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED3E168F8E0A00CB59EA /* MainStoryboard_iPad.storyboard */; };
+ 7797ED43168F8E0A00CB59EA /* KLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED42168F8E0A00CB59EA /* KLViewController.m */; };
+ 7797ED4B168F8E0A00CB59EA /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED4A168F8E0A00CB59EA /* SenTestingKit.framework */; };
+ 7797ED4C168F8E0A00CB59EA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED23168F8E0A00CB59EA /* UIKit.framework */; };
+ 7797ED4D168F8E0A00CB59EA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7797ED25168F8E0A00CB59EA /* Foundation.framework */; };
+ 7797ED55168F8E0A00CB59EA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED53168F8E0A00CB59EA /* InfoPlist.strings */; };
+ 7797ED58168F8E0A00CB59EA /* KLNoteViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED57168F8E0A00CB59EA /* KLNoteViewControllerTests.m */; };
+ 7797ED69168F8E2300CB59EA /* bar-mid.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED63168F8E2300CB59EA /* bar-mid.png */; };
+ 7797ED6A168F8E2300CB59EA /* bar-mid@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED64168F8E2300CB59EA /* bar-mid@2x.png */; };
+ 7797ED6B168F8E2300CB59EA /* KLNoteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED66168F8E2300CB59EA /* KLNoteViewController.m */; };
+ 7797ED72168F972600CB59EA /* KLNoteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7797ED66168F8E2300CB59EA /* KLNoteViewController.m */; };
+ 7797ED80168FACD800CB59EA /* bar-mid.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED63168F8E2300CB59EA /* bar-mid.png */; };
+ 7797ED81168FACD800CB59EA /* bar-mid@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7797ED64168F8E2300CB59EA /* bar-mid@2x.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 7797ED4E168F8E0A00CB59EA /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7797ED16168F8E0A00CB59EA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7797ED1E168F8E0A00CB59EA;
+ remoteInfo = KLNoteViewController;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 7740B0811692483E00449E10 /* background-dark-gray-tex.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background-dark-gray-tex.png"; sourceTree = "<group>"; };
+ 7740B0821692483E00449E10 /* background-dark-gray-tex@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "background-dark-gray-tex@2x.png"; sourceTree = "<group>"; };
+ 7740B086169248D200449E10 /* NavigationControllerData.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = NavigationControllerData.plist; sourceTree = "<group>"; };
+ 7740B08816924C6600449E10 /* premium-header-mid-skinny.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "premium-header-mid-skinny.png"; sourceTree = "<group>"; };
+ 7740B08A16924DA100449E10 /* premium-header-mid-skinny@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "premium-header-mid-skinny@2x.png"; sourceTree = "<group>"; };
+ 7797ED1F168F8E0A00CB59EA /* KLNoteViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KLNoteViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7797ED23168F8E0A00CB59EA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 7797ED25168F8E0A00CB59EA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 7797ED27168F8E0A00CB59EA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 7797ED2B168F8E0A00CB59EA /* KLNoteViewController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "KLNoteViewController-Info.plist"; sourceTree = "<group>"; };
+ 7797ED2D168F8E0A00CB59EA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 7797ED2F168F8E0A00CB59EA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 7797ED31168F8E0A00CB59EA /* KLNoteViewController-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "KLNoteViewController-Prefix.pch"; sourceTree = "<group>"; };
+ 7797ED32168F8E0A00CB59EA /* KLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KLAppDelegate.h; sourceTree = "<group>"; };
+ 7797ED33168F8E0A00CB59EA /* KLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KLAppDelegate.m; sourceTree = "<group>"; };
+ 7797ED35168F8E0A00CB59EA /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 7797ED37168F8E0A00CB59EA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ 7797ED39168F8E0A00CB59EA /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
+ 7797ED3C168F8E0A00CB59EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+ 7797ED3F168F8E0A00CB59EA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
+ 7797ED41168F8E0A00CB59EA /* KLViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KLViewController.h; sourceTree = "<group>"; };
+ 7797ED42168F8E0A00CB59EA /* KLViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KLViewController.m; sourceTree = "<group>"; };
+ 7797ED49168F8E0A00CB59EA /* KLNoteViewControllerTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KLNoteViewControllerTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7797ED4A168F8E0A00CB59EA /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 7797ED52168F8E0A00CB59EA /* KLNoteViewControllerTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "KLNoteViewControllerTests-Info.plist"; sourceTree = "<group>"; };
+ 7797ED54168F8E0A00CB59EA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 7797ED56168F8E0A00CB59EA /* KLNoteViewControllerTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KLNoteViewControllerTests.h; sourceTree = "<group>"; };
+ 7797ED57168F8E0A00CB59EA /* KLNoteViewControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KLNoteViewControllerTests.m; sourceTree = "<group>"; };
+ 7797ED63168F8E2300CB59EA /* bar-mid.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bar-mid.png"; sourceTree = "<group>"; };
+ 7797ED64168F8E2300CB59EA /* bar-mid@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bar-mid@2x.png"; sourceTree = "<group>"; };
+ 7797ED65168F8E2300CB59EA /* KLNoteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KLNoteViewController.h; sourceTree = "<group>"; };
+ 7797ED66168F8E2300CB59EA /* KLNoteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KLNoteViewController.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 7797ED1C168F8E0A00CB59EA /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED24168F8E0A00CB59EA /* UIKit.framework in Frameworks */,
+ 7797ED26168F8E0A00CB59EA /* Foundation.framework in Frameworks */,
+ 7797ED28168F8E0A00CB59EA /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7797ED45168F8E0A00CB59EA /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED4B168F8E0A00CB59EA /* SenTestingKit.framework in Frameworks */,
+ 7797ED4C168F8E0A00CB59EA /* UIKit.framework in Frameworks */,
+ 7797ED4D168F8E0A00CB59EA /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 7797ED14168F8E0A00CB59EA = {
+ isa = PBXGroup;
+ children = (
+ 7797ED29168F8E0A00CB59EA /* KLNoteViewController */,
+ 7797ED50168F8E0A00CB59EA /* KLNoteViewControllerTests */,
+ 7797ED22168F8E0A00CB59EA /* Frameworks */,
+ 7797ED20168F8E0A00CB59EA /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 7797ED20168F8E0A00CB59EA /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED1F168F8E0A00CB59EA /* KLNoteViewController.app */,
+ 7797ED49168F8E0A00CB59EA /* KLNoteViewControllerTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 7797ED22168F8E0A00CB59EA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED23168F8E0A00CB59EA /* UIKit.framework */,
+ 7797ED25168F8E0A00CB59EA /* Foundation.framework */,
+ 7797ED27168F8E0A00CB59EA /* CoreGraphics.framework */,
+ 7797ED4A168F8E0A00CB59EA /* SenTestingKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 7797ED29168F8E0A00CB59EA /* KLNoteViewController */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED6D168F8E3B00CB59EA /* Images */,
+ 7797ED6C168F8E2800CB59EA /* Class */,
+ 7797ED32168F8E0A00CB59EA /* KLAppDelegate.h */,
+ 7797ED33168F8E0A00CB59EA /* KLAppDelegate.m */,
+ 7797ED3B168F8E0A00CB59EA /* MainStoryboard_iPhone.storyboard */,
+ 7797ED3E168F8E0A00CB59EA /* MainStoryboard_iPad.storyboard */,
+ 7797ED41168F8E0A00CB59EA /* KLViewController.h */,
+ 7797ED42168F8E0A00CB59EA /* KLViewController.m */,
+ 7797ED2A168F8E0A00CB59EA /* Supporting Files */,
+ 7740B086169248D200449E10 /* NavigationControllerData.plist */,
+ );
+ path = KLNoteViewController;
+ sourceTree = "<group>";
+ };
+ 7797ED2A168F8E0A00CB59EA /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED2B168F8E0A00CB59EA /* KLNoteViewController-Info.plist */,
+ 7797ED2C168F8E0A00CB59EA /* InfoPlist.strings */,
+ 7797ED2F168F8E0A00CB59EA /* main.m */,
+ 7797ED31168F8E0A00CB59EA /* KLNoteViewController-Prefix.pch */,
+ 7797ED35168F8E0A00CB59EA /* Default.png */,
+ 7797ED37168F8E0A00CB59EA /* Default@2x.png */,
+ 7797ED39168F8E0A00CB59EA /* Default-568h@2x.png */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 7797ED50168F8E0A00CB59EA /* KLNoteViewControllerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED56168F8E0A00CB59EA /* KLNoteViewControllerTests.h */,
+ 7797ED57168F8E0A00CB59EA /* KLNoteViewControllerTests.m */,
+ 7797ED51168F8E0A00CB59EA /* Supporting Files */,
+ );
+ path = KLNoteViewControllerTests;
+ sourceTree = "<group>";
+ };
+ 7797ED51168F8E0A00CB59EA /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED52168F8E0A00CB59EA /* KLNoteViewControllerTests-Info.plist */,
+ 7797ED53168F8E0A00CB59EA /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 7797ED6C168F8E2800CB59EA /* Class */ = {
+ isa = PBXGroup;
+ children = (
+ 7797ED65168F8E2300CB59EA /* KLNoteViewController.h */,
+ 7797ED66168F8E2300CB59EA /* KLNoteViewController.m */,
+ );
+ name = Class;
+ sourceTree = "<group>";
+ };
+ 7797ED6D168F8E3B00CB59EA /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ 7740B08A16924DA100449E10 /* premium-header-mid-skinny@2x.png */,
+ 7740B08816924C6600449E10 /* premium-header-mid-skinny.png */,
+ 7740B0811692483E00449E10 /* background-dark-gray-tex.png */,
+ 7740B0821692483E00449E10 /* background-dark-gray-tex@2x.png */,
+ 7797ED63168F8E2300CB59EA /* bar-mid.png */,
+ 7797ED64168F8E2300CB59EA /* bar-mid@2x.png */,
+ );
+ name = Images;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 7797ED1E168F8E0A00CB59EA /* KLNoteViewController */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7797ED5B168F8E0A00CB59EA /* Build configuration list for PBXNativeTarget "KLNoteViewController" */;
+ buildPhases = (
+ 7797ED1B168F8E0A00CB59EA /* Sources */,
+ 7797ED1C168F8E0A00CB59EA /* Frameworks */,
+ 7797ED1D168F8E0A00CB59EA /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = KLNoteViewController;
+ productName = KLNoteViewController;
+ productReference = 7797ED1F168F8E0A00CB59EA /* KLNoteViewController.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 7797ED48168F8E0A00CB59EA /* KLNoteViewControllerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7797ED5E168F8E0A00CB59EA /* Build configuration list for PBXNativeTarget "KLNoteViewControllerTests" */;
+ buildPhases = (
+ 7797ED44168F8E0A00CB59EA /* Sources */,
+ 7797ED45168F8E0A00CB59EA /* Frameworks */,
+ 7797ED46168F8E0A00CB59EA /* Resources */,
+ 7797ED47168F8E0A00CB59EA /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 7797ED4F168F8E0A00CB59EA /* PBXTargetDependency */,
+ );
+ name = KLNoteViewControllerTests;
+ productName = KLNoteViewControllerTests;
+ productReference = 7797ED49168F8E0A00CB59EA /* KLNoteViewControllerTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7797ED16168F8E0A00CB59EA /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = KL;
+ LastUpgradeCheck = 0450;
+ ORGANIZATIONNAME = "Kieran Lafferty";
+ };
+ buildConfigurationList = 7797ED19168F8E0A00CB59EA /* Build configuration list for PBXProject "KLNoteViewController" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 7797ED14168F8E0A00CB59EA;
+ productRefGroup = 7797ED20168F8E0A00CB59EA /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 7797ED1E168F8E0A00CB59EA /* KLNoteViewController */,
+ 7797ED48168F8E0A00CB59EA /* KLNoteViewControllerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 7797ED1D168F8E0A00CB59EA /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED80168FACD800CB59EA /* bar-mid.png in Resources */,
+ 7797ED81168FACD800CB59EA /* bar-mid@2x.png in Resources */,
+ 7797ED2E168F8E0A00CB59EA /* InfoPlist.strings in Resources */,
+ 7797ED36168F8E0A00CB59EA /* Default.png in Resources */,
+ 7797ED38168F8E0A00CB59EA /* Default@2x.png in Resources */,
+ 7797ED3A168F8E0A00CB59EA /* Default-568h@2x.png in Resources */,
+ 7797ED3D168F8E0A00CB59EA /* MainStoryboard_iPhone.storyboard in Resources */,
+ 7797ED40168F8E0A00CB59EA /* MainStoryboard_iPad.storyboard in Resources */,
+ 7740B0831692483E00449E10 /* background-dark-gray-tex.png in Resources */,
+ 7740B0841692483E00449E10 /* background-dark-gray-tex@2x.png in Resources */,
+ 7740B087169248D200449E10 /* NavigationControllerData.plist in Resources */,
+ 7740B08916924C6600449E10 /* premium-header-mid-skinny.png in Resources */,
+ 7740B08B16924DA100449E10 /* premium-header-mid-skinny@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7797ED46168F8E0A00CB59EA /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED55168F8E0A00CB59EA /* InfoPlist.strings in Resources */,
+ 7797ED69168F8E2300CB59EA /* bar-mid.png in Resources */,
+ 7797ED6A168F8E2300CB59EA /* bar-mid@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 7797ED47168F8E0A00CB59EA /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 7797ED1B168F8E0A00CB59EA /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED72168F972600CB59EA /* KLNoteViewController.m in Sources */,
+ 7797ED30168F8E0A00CB59EA /* main.m in Sources */,
+ 7797ED34168F8E0A00CB59EA /* KLAppDelegate.m in Sources */,
+ 7797ED43168F8E0A00CB59EA /* KLViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7797ED44168F8E0A00CB59EA /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7797ED58168F8E0A00CB59EA /* KLNoteViewControllerTests.m in Sources */,
+ 7797ED6B168F8E2300CB59EA /* KLNoteViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 7797ED4F168F8E0A00CB59EA /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7797ED1E168F8E0A00CB59EA /* KLNoteViewController */;
+ targetProxy = 7797ED4E168F8E0A00CB59EA /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 7797ED2C168F8E0A00CB59EA /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7797ED2D168F8E0A00CB59EA /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 7797ED3B168F8E0A00CB59EA /* MainStoryboard_iPhone.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7797ED3C168F8E0A00CB59EA /* en */,
+ );
+ name = MainStoryboard_iPhone.storyboard;
+ sourceTree = "<group>";
+ };
+ 7797ED3E168F8E0A00CB59EA /* MainStoryboard_iPad.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7797ED3F168F8E0A00CB59EA /* en */,
+ );
+ name = MainStoryboard_iPad.storyboard;
+ sourceTree = "<group>";
+ };
+ 7797ED53168F8E0A00CB59EA /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7797ED54168F8E0A00CB59EA /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 7797ED59168F8E0A00CB59EA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 7797ED5A168F8E0A00CB59EA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 7797ED5C168F8E0A00CB59EA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "KLNoteViewController/KLNoteViewController-Prefix.pch";
+ INFOPLIST_FILE = "KLNoteViewController/KLNoteViewController-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 7797ED5D168F8E0A00CB59EA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "KLNoteViewController/KLNoteViewController-Prefix.pch";
+ INFOPLIST_FILE = "KLNoteViewController/KLNoteViewController-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ 7797ED5F168F8E0A00CB59EA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/KLNoteViewController.app/KLNoteViewController";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "KLNoteViewController/KLNoteViewController-Prefix.pch";
+ INFOPLIST_FILE = "KLNoteViewControllerTests/KLNoteViewControllerTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 7797ED60168F8E0A00CB59EA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/KLNoteViewController.app/KLNoteViewController";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "KLNoteViewController/KLNoteViewController-Prefix.pch";
+ INFOPLIST_FILE = "KLNoteViewControllerTests/KLNoteViewControllerTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 7797ED19168F8E0A00CB59EA /* Build configuration list for PBXProject "KLNoteViewController" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7797ED59168F8E0A00CB59EA /* Debug */,
+ 7797ED5A168F8E0A00CB59EA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7797ED5B168F8E0A00CB59EA /* Build configuration list for PBXNativeTarget "KLNoteViewController" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7797ED5C168F8E0A00CB59EA /* Debug */,
+ 7797ED5D168F8E0A00CB59EA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7797ED5E168F8E0A00CB59EA /* Build configuration list for PBXNativeTarget "KLNoteViewControllerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7797ED5F168F8E0A00CB59EA /* Debug */,
+ 7797ED60168F8E0A00CB59EA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7797ED16168F8E0A00CB59EA /* Project object */;
+}
7 KLNoteViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:KLNoteViewController.xcodeproj">
+ </FileRef>
+</Workspace>
BIN  ...oller.xcodeproj/project.xcworkspace/xcuserdata/kieranlafferty.xcuserdatad/UserInterfaceState.xcuserstate
View
Binary file not shown
10 ...troller.xcodeproj/project.xcworkspace/xcuserdata/kieranlafferty.xcuserdatad/WorkspaceSettings.xcsettings
View
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <true/>
+</dict>
+</plist>
5 KLNoteViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
View
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+</Bucket>
96 ...teViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcschemes/KLNoteViewController.xcscheme
View
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0450"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7797ED1E168F8E0A00CB59EA"
+ BuildableName = "KLNoteViewController.app"
+ BlueprintName = "KLNoteViewController"
+ ReferencedContainer = "container:KLNoteViewController.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7797ED48168F8E0A00CB59EA"
+ BuildableName = "KLNoteViewControllerTests.octest"
+ BlueprintName = "KLNoteViewControllerTests"
+ ReferencedContainer = "container:KLNoteViewController.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7797ED1E168F8E0A00CB59EA"
+ BuildableName = "KLNoteViewController.app"
+ BlueprintName = "KLNoteViewController"
+ ReferencedContainer = "container:KLNoteViewController.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7797ED1E168F8E0A00CB59EA"
+ BuildableName = "KLNoteViewController.app"
+ BlueprintName = "KLNoteViewController"
+ ReferencedContainer = "container:KLNoteViewController.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7797ED1E168F8E0A00CB59EA"
+ BuildableName = "KLNoteViewController.app"
+ BlueprintName = "KLNoteViewController"
+ ReferencedContainer = "container:KLNoteViewController.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
27 KLNoteViewController.xcodeproj/xcuserdata/kieranlafferty.xcuserdatad/xcschemes/xcschememanagement.plist
View
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>KLNoteViewController.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>7797ED1E168F8E0A00CB59EA</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ <key>7797ED48168F8E0A00CB59EA</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
BIN  KLNoteViewController/.DS_Store
View
Binary file not shown
BIN  KLNoteViewController/Default-568h@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/Default.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/Default@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 KLNoteViewController/KLAppDelegate.h
View
@@ -0,0 +1,15 @@
+//
+// KLAppDelegate.h
+// KLNoteViewController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface KLAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
63 KLNoteViewController/KLAppDelegate.m
View
@@ -0,0 +1,63 @@
+//
+// KLAppDelegate.m
+// KLNoteViewController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import "KLAppDelegate.h"
+
+@implementation KLAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+
+
+
+ // Override point for customization after application launch.
+ return YES;
+}
+- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {
+ UIGraphicsBeginImageContext(image1.size);
+
+ // Draw image1
+ [image1 drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];
+
+ // Draw image2
+ [image2 drawInRect:CGRectMake(0, 0, image2.size.width, image2.size.height)];
+
+ UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
+
+ UIGraphicsEndImageContext();
+
+ return resultingImage;
+}
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
49 KLNoteViewController/KLNoteViewController-Info.plist
View
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>KL.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard_iPhone</string>
+ <key>UIMainStoryboardFile~ipad</key>
+ <string>MainStoryboard_iPad</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
14 KLNoteViewController/KLNoteViewController-Prefix.pch
View
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'KLNoteViewController' target in the 'KLNoteViewController' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
80 KLNoteViewController/KLNoteViewController.h
View
@@ -0,0 +1,80 @@
+//
+// KLNoteViewController.h
+// KLNoteController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class KLNoteViewController;
+@class KLControllerCard;
+@protocol KLNoteViewControllerDataSource;
+@protocol KLNoteViewControllerDelegate;
+
+enum {
+ KLControllerCardStateHiddenBottom, //Card is hidden off screen (Below bottom of visible area)
+ KLControllerCardStateHiddenTop, //Card is hidden off screen (At top of visible area)
+ KLControllerCardStateDefault, //Default location for the card
+ KLControllerCardStateFullScreen //Highlighted location for the card
+};
+typedef UInt32 KLControllerCardState;
+
+@protocol KLControllerCardDelegate <NSObject>
+@optional
+//Called on any time a state change has occured - even if a state has changed to itself - (i.e. from KLControllerCardStateDefault to KLControllerCardStateDefault)
+-(void) controllerCard:(KLControllerCard*)controllerCard didChangeToDisplayState:(KLControllerCardState) toState fromDisplayState:(KLControllerCardState) fromState;
+
+//Called when user is panning and a the card has travelled X percent of the distance to the top - Used to redraw other cards during panning fanout
+-(void) controllerCard:(KLControllerCard*)controllerCard didUpdatePanPercentage:(CGFloat) percentage;
+@end
+
+//KLController card encapsulates the UINavigationController handling all the resizing and state management for the view. It has no concept of the other cards or world outside of itself.
+@interface KLControllerCard : UIView
+{
+ @private
+ CGFloat originY;
+ CGFloat scalingFactor;
+ NSInteger index;
+}
+@property (nonatomic, strong) UINavigationController* navigationController;
+@property (nonatomic, strong) KLNoteViewController* noteViewController;
+@property (nonatomic, strong) id<KLControllerCardDelegate> delegate;
+@property (nonatomic) CGPoint origin;
+@property (nonatomic) KLControllerCardState state;
+-(id) initWithNoteViewController: (KLNoteViewController*) noteView navigationController:(UINavigationController*) navigationController index:(NSInteger) index;
+-(void) setState:(KLControllerCardState) state animated:(BOOL) animated;
+-(void) setYCoordinate:(CGFloat)yValue;
+-(CGFloat) percentageDistanceTravelled;
+@end
+
+//KLNoteViewController manages the cards interfacing between the various cards
+@interface KLNoteViewController : UIViewController <KLControllerCardDelegate> {
+ NSInteger totalCards;
+}
+@property (nonatomic, assign) id<KLNoteViewControllerDataSource> dataSource;
+@property (nonatomic, assign) id<KLNoteViewControllerDelegate> delegate;
+
+//KLControllerCards in an array. Object at index 0 will appear at bottom of the stack, and object at position (size-1) will appear at the top
+@property (nonatomic, strong) NSArray* controllerCards;
+
+//Repopulates all data for the controllerCards array
+-(void) reloadData;
+
+//Helpers for getting information about the controller cards
+- (NSInteger)numberOfControllerCardsInNoteView:(KLNoteViewController*) noteView;
+- (UINavigationController *)noteView:(KLNoteViewController*)noteView controllerCardForRowAtIndexPath:(NSIndexPath *)indexPath;
+- (NSIndexPath*) indexPathForControllerCard: (KLControllerCard*) controllerCard;
+@end
+@protocol KLNoteViewControllerDelegate <NSObject>
+@optional
+//Called on any time a state change has occured - even if a state has changed to itself - (i.e. from KLControllerCardStateDefault to KLControllerCardStateDefault)
+-(void) controllerCard:(KLControllerCard*)controllerCard didChangeToDisplayState:(KLControllerCardState) toState fromDisplayState:(KLControllerCardState) fromState;
+@end
+@protocol KLNoteViewControllerDataSource <NSObject>
+@required
+//Called when the NoteViewController needs to know how many controller cards to expect
+- (NSInteger)numberOfControllerCardsInNoteView:(KLNoteViewController*) noteView;
+//Called to populate the controllerCards array - Automatically maps the UINavigationController to KLControllerCard and adds to array
+- (UINavigationController *)noteView:(KLNoteViewController*)noteView controllerCardForRowAtIndexPath:(NSIndexPath *)indexPath;
+@end
408 KLNoteViewController/KLNoteViewController.m
View
@@ -0,0 +1,408 @@
+//
+// KLNoteViewController.m
+// KLNoteController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import "KLNoteViewController.h"
+#import <QuartzCore/QuartzCore.h>
+
+//Layout properties
+#define kDefaultMinimizedScalingFactor 0.98 //Amount to shrink each card from the previous one
+#define kDefaultMaximizedScalingFactor 1.00 //Maximum a card can be scaled to
+#define kDefaultNavigationBarOverlap 0.90 //Defines vertical overlap of each navigation toolbar. Slight hack that prevents rounding errors from showing the whitespace between navigation toolbars. Can be customized if require more/less packing of navigation toolbars
+
+//Animation properties
+#define kDefaultAnimationDuration 0.3 //Amount of time for the animations to occur
+
+//Position for the stack of navigation controllers to originate at
+#define kDefaultVerticalOrigin 100 //Vertical origin of the controller card stack. Making this value larger/smaller will make the card shift down/up.
+#define kDefaultNavigationControllerToolbarHeight 44 //TODO: remove dependancy on this and get directly from the navigationcontroller itself
+
+//Shadow Properties - Note : Disabling shadows greatly improves performance and fluidity of animations
+#define kDefaultShadowEnabled YES
+#define kDefaultShadowColor [UIColor blackColor]
+#define kDefaultShadowOffset CGSizeMake(0, -5)
+#define kDefaultShadowRadius 7.0
+#define kDefaultShadowOpacity 0.60
+
+//Corner radius properties
+#define kDefaultCornerRadius 5.0
+
+//Gesture properties
+#define kDefaultMinimumPressDuration 0.2
+
+@interface KLNoteViewController ()
+//Drawing information for the navigation controllers
+- (CGFloat) defaultVerticalOriginForIndex: (NSInteger) index;
+- (CGFloat) scalingFactorForIndex: (NSInteger) index;
+@end
+
+@implementation KLNoteViewController
+
+
+- (void)viewDidLoad
+{
+
+ //Populate the navigation controllers to the controller stack
+ [self reloadData];
+
+ [super viewDidLoad];
+
+ // Do any additional setup after loading the view.
+ [self reloadInputViews];
+
+}
+#pragma Drawing Methods - Used to position and present the navigation controllers on screen
+
+- (CGFloat) defaultVerticalOriginForIndex: (NSInteger) index {
+ //Sum up the shrunken size of each of the cards appearing before the current index
+ CGFloat originOffset = 0;
+ for (int i = 0; i < index; i ++) {
+ CGFloat scalingFactor = [self scalingFactorForIndex: i];
+ originOffset += scalingFactor * kDefaultNavigationControllerToolbarHeight * kDefaultNavigationBarOverlap;
+ }
+
+ //Position should start at kDefaultVerticalOrigin and move down by size of nav toolbar for each additional nav controller
+ return kDefaultVerticalOrigin + originOffset;
+}
+- (CGFloat) scalingFactorForIndex: (NSInteger) index {
+ //Items should get progressively smaller based on their index in the navigation controller array
+ return powf(kDefaultMinimizedScalingFactor, (totalCards - index));
+}
+
+- (void) reloadData {
+ //Get the number of navigation controllers to expect
+ totalCards = [self numberOfControllerCardsInNoteView:self];
+
+ //For each expected controller grab from the instantiating class and populate into local controller stack
+ NSMutableArray* navigationControllers = [[NSMutableArray alloc] initWithCapacity: totalCards];
+ for (NSInteger count = 0; count < totalCards; count++) {
+ UINavigationController* navCont = [self noteView:self
+ controllerCardForRowAtIndexPath:[NSIndexPath indexPathForRow:count inSection:0]];
+ KLControllerCard* noteContainer = [[KLControllerCard alloc] initWithNoteViewController: self
+ navigationController: navCont
+ index:count];
+ [noteContainer setDelegate: self];
+ [navigationControllers addObject: noteContainer];
+ }
+
+ self.controllerCards = [NSArray arrayWithArray:navigationControllers];
+}
+
+- (void) reloadInputViews {
+ [super reloadInputViews];
+
+ //First remove all of the navigation controllers from the view to avoid redrawing over top of views
+ [self removeNavigationContainersFromSuperView];
+
+ //Add the navigation controllers to the view
+ for (KLControllerCard* container in self.controllerCards) {
+ [self.view addSubview:container];
+ }
+}
+
+#pragma mark - Manage KLControllerCard helpers
+
+-(void) removeNavigationContainersFromSuperView {
+ for (KLControllerCard* navigationContainer in self.controllerCards) {
+ [navigationContainer removeFromSuperview];
+ }
+}
+- (NSIndexPath*) indexPathForControllerCard: (KLControllerCard*) navigationContainer {
+ NSInteger rowNumber = [self.controllerCards indexOfObject: navigationContainer];
+
+ return [NSIndexPath indexPathForRow:rowNumber inSection:0];
+}
+
+- (NSArray*) controllerCardAboveCard:(KLControllerCard*) card {
+ NSInteger index = [self.controllerCards indexOfObject:card];
+
+ return [self.controllerCards filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(KLControllerCard* controllerCard, NSDictionary *bindings) {
+ NSInteger currentIndex = [self.controllerCards indexOfObject:controllerCard];
+
+ //Only return cards with an index less than the one being compared to
+ return index > currentIndex;
+ }]];
+}
+- (NSArray*) controllerCardBelowCard:(KLControllerCard*) card {
+ NSInteger index = [self.controllerCards indexOfObject: card];
+
+ return [self.controllerCards filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(KLControllerCard* controllerCard, NSDictionary *bindings) {
+ NSInteger currentIndex = [self.controllerCards indexOfObject:controllerCard];
+
+ //Only return cards with an index greater than the one being compared to
+ return index < currentIndex;
+ }]];
+}
+
+#pragma mark - KLNoteViewController Data Source methods
+
+//If the controller is subclassed it will allow these values to be grabbed by the subclass. If not sublclassed it will grab from the assigned datasource.
+- (NSInteger)numberOfControllerCardsInNoteView:(KLNoteViewController*) noteView{
+ return [self.dataSource numberOfControllerCardsInNoteView:self];
+}
+
+- (UINavigationController *)noteView:(KLNoteViewController*)noteView controllerCardForRowAtIndexPath:(NSIndexPath *)indexPath {
+ return [self noteView:noteView controllerCardForRowAtIndexPath:indexPath];
+}
+
+
+#pragma mark - Delegate implementation for KLControllerCard
+
+-(void) controllerCard:(KLControllerCard*)controllerCard didChangeToDisplayState:(KLControllerCardState) toState fromDisplayState:(KLControllerCardState) fromState {
+
+ if (fromState == KLControllerCardStateDefault && toState == KLControllerCardStateFullScreen) {
+
+ //For all cards above the current card move them
+ for (KLControllerCard* currentCard in [self controllerCardAboveCard:controllerCard]) {
+ [currentCard setState:KLControllerCardStateHiddenTop animated:YES];
+ }
+ for (KLControllerCard* currentCard in [self controllerCardBelowCard:controllerCard]) {
+ [currentCard setState:KLControllerCardStateHiddenBottom animated:YES];
+ }
+ }
+ else if (fromState == KLControllerCardStateFullScreen && toState == KLControllerCardStateDefault) {
+ //For all cards above the current card move them back to default state
+ for (KLControllerCard* currentCard in [self controllerCardAboveCard:controllerCard]) {
+ [currentCard setState:KLControllerCardStateDefault animated:YES];
+ }
+ //For all cards below the current card move them back to default state
+ for (KLControllerCard* currentCard in [self controllerCardBelowCard:controllerCard]) {
+ [currentCard setState:KLControllerCardStateHiddenBottom animated:NO];
+ [currentCard setState:KLControllerCardStateDefault animated:YES];
+ }
+ }
+ else if (fromState == KLControllerCardStateDefault && toState == KLControllerCardStateDefault){
+ //If the current state is default and the user does not travel far enough to kick into a new state, then return all cells back to their default state
+ for (KLControllerCard* cardBelow in [self controllerCardBelowCard: controllerCard]) {
+ [cardBelow setState:KLControllerCardStateDefault animated:YES];
+ }
+ }
+
+ //Notify the delegate of the change
+ if ([self.delegate respondsToSelector:@selector(controllerCard:didChangeToDisplayState:fromDisplayState:)]) {
+ [self.delegate controllerCard:controllerCard
+ didChangeToDisplayState:toState fromDisplayState: fromState];
+ }
+}
+-(void) controllerCard:(KLControllerCard*)controllerCard didUpdatePanPercentage:(CGFloat) percentage {
+ if (controllerCard.state == KLControllerCardStateFullScreen) {
+ for (KLControllerCard* currentCard in [self controllerCardAboveCard: controllerCard]) {
+ CGFloat yCoordinate = (CGFloat) currentCard.origin.y * [controllerCard percentageDistanceTravelled];
+ [currentCard setYCoordinate: yCoordinate];
+ }
+ }
+ else if (controllerCard.state == KLControllerCardStateDefault) {
+ for (KLControllerCard* currentCard in [self controllerCardBelowCard: controllerCard]) {
+ CGFloat deltaDistance = controllerCard.frame.origin.y - controllerCard.origin.y;
+ CGFloat yCoordinate = currentCard.origin.y + deltaDistance;
+ [currentCard setYCoordinate: yCoordinate];
+ }
+ }
+}
+@end
+
+@interface KLControllerCard ()
+-(void) shrinkCardToScaledSize:(BOOL) animated;
+-(void) expandCardToFullSize:(BOOL) animated;
+@end
+
+@implementation KLControllerCard
+
+-(id) initWithNoteViewController: (KLNoteViewController*) noteView navigationController:(UINavigationController*) navigationController index:(NSInteger) _index {
+ //Set the instance variables
+ index = _index;
+ originY = [noteView defaultVerticalOriginForIndex: index];
+ self.noteViewController = noteView;
+ self.navigationController = navigationController;
+
+ if (self = [super initWithFrame: navigationController.view.bounds]) {
+ //Initialize the view's properties
+ [self shrinkCardToScaledSize:NO];
+ [self setAutoresizesSubviews:YES];
+ [self setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
+ [self addSubview: navigationController.view];
+ [self.navigationController.view.layer setCornerRadius: kDefaultCornerRadius];
+ [self.navigationController.view setClipsToBounds:YES];
+ [self setYCoordinate: originY];
+ if (kDefaultShadowEnabled) {
+ UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:[self bounds] cornerRadius:kDefaultCornerRadius];
+
+ [self.layer setShadowOpacity: kDefaultShadowOpacity];
+ [self.layer setShadowOffset: kDefaultShadowOffset];
+ [self.layer setShadowRadius: kDefaultShadowRadius];
+ [self.layer setShadowColor: [kDefaultShadowColor CGColor]];
+ [self.layer setShadowPath: [path CGPath]];
+ }
+ //Add Pan Gesture
+ UIPanGestureRecognizer* panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self
+ action:@selector(didPerformPanGesture:)];
+ //Add touch recognizer
+ UILongPressGestureRecognizer* pressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self
+ action:@selector(didPerformLongPress:)];
+ [pressGesture setMinimumPressDuration: kDefaultMinimumPressDuration];
+
+ //Add the gestures to the navigationcontrollers navigation bar
+ [self.navigationController.navigationBar addGestureRecognizer: panGesture];
+ [self.navigationController.navigationBar addGestureRecognizer:pressGesture];
+
+ //Initialize the state to default
+ self.state = KLControllerCardStateDefault;
+ }
+ return self;
+}
+
+#pragma mark - UIGestureRecognizer action handlers
+
+-(void) didPerformLongPress:(UILongPressGestureRecognizer*) recognizer {
+
+ if (self.state == KLControllerCardStateDefault) {
+ //Go to full size
+ [self setState:KLControllerCardStateFullScreen animated:YES];
+ }
+}
+-(void) didPerformPanGesture:(UIPanGestureRecognizer*) recognizer {
+ CGPoint location = [recognizer locationInView: self.noteViewController.view];
+ CGPoint translation = [recognizer translationInView: self];
+
+ if (recognizer.state == UIGestureRecognizerStateBegan) {
+ //Begin animation
+ if (self.state == KLControllerCardStateFullScreen) {
+ //Shrink to regular size
+ [self shrinkCardToScaledSize:YES];
+ }
+ }
+ else if (recognizer.state == UIGestureRecognizerStateChanged) {
+ //Check if panning downwards and move other cards
+ if (translation.y > 0){
+ //Panning downwards from Full screen state
+ if (self.state == KLControllerCardStateFullScreen && self.frame.origin.y < originY) {
+
+ //Notify delegate so it can update the coordinates of the other cards unless user has travelled past the origin y coordinate
+ if ([self.delegate respondsToSelector:@selector(controllerCard:didUpdatePanPercentage:)]) {
+ [self.delegate controllerCard:self didUpdatePanPercentage: [self percentageDistanceTravelled]];
+ }
+
+ }
+ //Panning downwards from default state
+ else if (self.state == KLControllerCardStateDefault && self.frame.origin.y > originY) {
+ //Implements behavior such that when originating at the default position and scrolling down, all other cards below the scrolling card move down at the same rate
+ if ([self.delegate respondsToSelector:@selector(controllerCard:didUpdatePanPercentage:)] ) {
+ [self.delegate controllerCard:self didUpdatePanPercentage: [self percentageDistanceTravelled]];
+ }
+ }
+ }
+
+ //Track the movement of the users finger during the swipe gesture
+ [self setYCoordinate: location.y];
+ }
+ else if (recognizer.state == UIGestureRecognizerStateEnded) {
+ //Check if it should return to the origin location
+ if ([self shouldReturnToOrigin:[recognizer translationInView:self]]) {
+ [self setState:KLControllerCardStateDefault animated:YES];
+ }
+ else {
+ //Go to full size
+ [self setState:KLControllerCardStateFullScreen animated:YES];
+ }
+ }
+}
+
+#pragma mark - Handle resizing of card
+
+-(void) shrinkCardToScaledSize:(BOOL) animated {
+
+ //Set the scaling factor if not already set
+ if (!scalingFactor) {
+ scalingFactor = [self.noteViewController scalingFactorForIndex: index];
+ }
+ //If animated then animate the shrinking else no animation
+ if (animated) {
+ [UIView animateWithDuration:kDefaultAnimationDuration
+ animations:^{
+ //Slightly recursive to reduce duplicate code
+ [self shrinkCardToScaledSize:NO];
+ }];
+ }
+ else {
+ [self setTransform: CGAffineTransformMakeScale(scalingFactor, scalingFactor)];
+ }
+}
+-(void) expandCardToFullSize:(BOOL) animated {
+
+ //Set the scaling factor if not already set
+ if (!scalingFactor) {
+ scalingFactor = [self.noteViewController scalingFactorForIndex: index];
+ }
+ //If animated then animate the shrinking else no animation
+ if (animated) {
+ [UIView animateWithDuration:kDefaultAnimationDuration
+ animations:^{
+ //Slightly recursive to reduce duplicate code
+ [self expandCardToFullSize:NO];
+ }];
+ }
+ else {
+ [self setTransform: CGAffineTransformMakeScale(kDefaultMaximizedScalingFactor, kDefaultMaximizedScalingFactor)];
+ }
+}
+
+#pragma mark - Handle state changes for card
+
+- (void) setState:(KLControllerCardState)state animated:(BOOL) animated{
+ if (animated) {
+ [UIView animateWithDuration:kDefaultAnimationDuration animations:^{
+ [self setState:state animated:NO];
+ }];
+ return;
+ }
+ //Full Screen State
+ if (state == KLControllerCardStateFullScreen) {
+ [self expandCardToFullSize:YES];
+ [self setYCoordinate: 0];
+ }
+ //Default State
+ else if (state == KLControllerCardStateDefault) {
+ [self shrinkCardToScaledSize:YES];
+ [self setYCoordinate: originY];
+ }
+ //Hidden State - Bottom
+ else if (state == KLControllerCardStateHiddenBottom) {
+ [self setYCoordinate: self.noteViewController.view.frame.size.height];
+ }
+ //Hidden State - Top
+ else if (state == KLControllerCardStateHiddenTop) {
+ [self setYCoordinate: 0];
+ }
+
+ //Notify the delegate of the state change (even if state changed to self)
+ KLControllerCardState lastState = self.state;
+ [self setState:state];
+ if ([self.delegate respondsToSelector:@selector(controllerCard:didChangeToDisplayState:fromDisplayState:)]) {
+ [self.delegate controllerCard:self
+ didChangeToDisplayState:state fromDisplayState: lastState];
+ }
+}
+
+#pragma mark - Various data helpers
+
+-(CGPoint) origin {
+ return CGPointMake(0, originY);
+}
+
+-(CGFloat) percentageDistanceTravelled {
+ return self.frame.origin.y/originY;
+}
+
+//Boolean for determining if the movement was sufficient to warrent changing states
+-(BOOL) shouldReturnToOrigin:(CGPoint) point {
+ return point.y > -self.navigationController.navigationBar.frame.size.height;
+}
+
+-(void) setYCoordinate:(CGFloat)yValue {
+ [self setFrame:CGRectMake(self.frame.origin.x, yValue, self.frame.size.width, self.frame.size.height)];
+}
+@end
14 KLNoteViewController/KLViewController.h
View
@@ -0,0 +1,14 @@
+//
+// KLViewController.h
+// KLNoteViewController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "KLNoteViewController.h"
+
+@interface KLViewController : KLNoteViewController
+@property (nonatomic, strong) NSArray* navigationControllers;
+@end
64 KLNoteViewController/KLViewController.m
View
@@ -0,0 +1,64 @@
+//
+// KLViewController.m
+// KLNoteViewController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import "KLViewController.h"
+
+@interface KLViewController ()
+
+@end
+
+@implementation KLViewController
+
+- (void)viewDidLoad
+{
+
+ // Do any additional setup after loading the view, typically from a nib.
+ [self.view setBackgroundColor: [UIColor colorWithPatternImage:[UIImage imageNamed:@"background-dark-gray-tex.png"]]];
+
+ //Initialize the controller data
+ NSString* plistPath = [[NSBundle mainBundle] pathForResource: @"NavigationControllerData"
+ ofType: @"plist"];
+ // Build the array from the plist
+ self.navigationControllers = [[NSArray alloc] initWithContentsOfFile:plistPath];
+
+ [super viewDidLoad];
+
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+- (NSInteger)numberOfControllerCardsInNoteView:(KLNoteViewController*) noteView {
+ //Arbitrarily retun 5
+ return [self.navigationControllers count];
+}
+- (UINavigationController *)noteView:(KLNoteViewController*)noteView controllerCardForRowAtIndexPath:(NSIndexPath *)indexPath {
+ //Get the relevant data for the navigation controller
+ NSDictionary* navDict = [self.navigationControllers objectAtIndex: indexPath.row];
+
+ //Initialize a blank uiviewcontroller for display purposes
+ UIViewController* viewController = [[UIViewController alloc] init];
+ [viewController.view setBackgroundColor: [UIColor colorWithRed: 225/255.0
+ green: 225/255.0
+ blue: 225/255.0
+ alpha: 1.0]];
+ [viewController setTitle: [navDict objectForKey:@"title"]];
+
+
+ //Initialize the nav controller with the view controller
+ UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController: viewController];
+ [navController.navigationBar setBackgroundImage: [UIImage imageNamed:[navDict objectForKey:@"image"]]
+ forBarMetrics: UIBarMetricsDefault];
+
+ //Return a blank navigationcontroller
+ return navController;
+}
+
+@end
36 KLNoteViewController/NavigationControllerData.plist
View
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<array>
+ <dict>
+ <key>image</key>
+ <string>premium-header-mid-skinny.png</string>
+ <key>title</key>
+ <string>Go Premium</string>
+ </dict>
+ <dict>
+ <key>image</key>
+ <string>bar-mid.png</string>
+ <key>title</key>
+ <string>Places</string>
+ </dict>
+ <dict>
+ <key>image</key>
+ <string>bar-mid.png</string>
+ <key>title</key>
+ <string>Tags</string>
+ </dict>
+ <dict>
+ <key>image</key>
+ <string>bar-mid.png</string>
+ <key>title</key>
+ <string>Notebooks</string>
+ </dict>
+ <dict>
+ <key>image</key>
+ <string>bar-mid.png</string>
+ <key>title</key>
+ <string>All Notes</string>
+ </dict>
+</array>
+</plist>
BIN  KLNoteViewController/background-dark-gray-tex.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/background-dark-gray-tex@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/bar-mid.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/bar-mid@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2  KLNoteViewController/en.lproj/InfoPlist.strings
View
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
37 KLNoteViewController/en.lproj/MainStoryboard_iPad.storyboard
View
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C3012" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="tkm-vp-pxi">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="nKU-r1-TUg">
+ <objects>
+ <viewController id="tkm-vp-pxi" customClass="KLViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="RWf-iG-r1y">
+ <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" id="18v-LM-6vs"/>
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="blackTranslucent"/>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="ZJ3-C3-FQ8" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="224" y="52"/>
+ </scene>
+ </scenes>
+ <classes>
+ <class className="KLNoteViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/KLNoteViewController.h"/>
+ </class>
+ <class className="KLViewController" superclassName="KLNoteViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/KLViewController.h"/>
+ </class>
+ </classes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
36 KLNoteViewController/en.lproj/MainStoryboard_iPhone.storyboard
View
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C3012" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="i0u-I3-KP6">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="zCI-Nc-Bau">
+ <objects>
+ <viewController id="i0u-I3-KP6" customClass="KLViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="eec-HS-0ia">
+ <rect key="frame" x="0.0" y="20" width="320" height="548"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" id="pR3-O1-qZw"/>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Wly-0f-QD7" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="224" y="52"/>
+ </scene>
+ </scenes>
+ <classes>
+ <class className="KLNoteViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/KLNoteViewController.h"/>
+ </class>
+ <class className="KLViewController" superclassName="KLNoteViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/KLViewController.h"/>
+ </class>
+ </classes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination" type="retina4"/>
+ </simulatedMetricsContainer>
+</document>
18 KLNoteViewController/main.m
View
@@ -0,0 +1,18 @@
+//
+// main.m
+// KLNoteViewController
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "KLAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([KLAppDelegate class]));
+ }
+}
BIN  KLNoteViewController/premium-header-mid-skinny.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  KLNoteViewController/premium-header-mid-skinny@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 KLNoteViewControllerTests/KLNoteViewControllerTests-Info.plist
View
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>KL.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
13 KLNoteViewControllerTests/KLNoteViewControllerTests.h
View
@@ -0,0 +1,13 @@
+//
+// KLNoteViewControllerTests.h
+// KLNoteViewControllerTests
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface KLNoteViewControllerTests : SenTestCase
+
+@end
32 KLNoteViewControllerTests/KLNoteViewControllerTests.m
View
@@ -0,0 +1,32 @@
+//
+// KLNoteViewControllerTests.m
+// KLNoteViewControllerTests
+//
+// Created by Kieran Lafferty on 2012-12-29.
+// Copyright (c) 2012 Kieran Lafferty. All rights reserved.
+//
+
+#import "KLNoteViewControllerTests.h"
+
+@implementation KLNoteViewControllerTests
+
+- (void)setUp
+{
+ [super setUp];
+
+ // Set-up code here.
+}
+
+- (void)tearDown
+{
+ // Tear-down code here.
+
+ [super tearDown];
+}
+
+- (void)testExample
+{
+ STFail(@"Unit tests are not implemented yet in KLNoteViewControllerTests");
+}
+
+@end
2  KLNoteViewControllerTests/en.lproj/InfoPlist.strings
View
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
Please sign in to comment.
Something went wrong with that request. Please try again.