Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Start modernizing project

* Remove SSSwitch
* Remove SSViewController (and related classes)
* Move resources to SSToolkitResources bundle
* Start localizing
* Remove unused images
  • Loading branch information...
commit 9b1cbb017ce51cc0080007701fb29b8891ae67ab 1 parent b95f71d
@soffes soffes authored
Showing with 436 additions and 1,166 deletions.
  1. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldBackground.png
  2. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldBackground@2x.png
  3. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldReload.png
  4. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldReload@2x.png
  5. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldStop.png
  6. 0  Resources/{SSToolkit.bundle → Images}/SSAddressBarTextFieldStop@2x.png
  7. 0  Resources/{SSToolkit.bundle → Images}/SSVignetteiPad.png
  8. 0  Resources/{SSToolkit.bundle → Images}/SSVignetteiPhone.png
  9. 0  Resources/{SSToolkit.bundle → Images}/SSVignetteiPhone@2x.png
  10. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarButton.png
  11. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarButton@2x.png
  12. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarButtonHighlighted.png
  13. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarButtonHighlighted@2x.png
  14. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarDivider.png
  15. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarDivider@2x.png
  16. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarDividerHighlighted.png
  17. 0  Resources/{SSToolkit.bundle → Images}/UISegmentBarDividerHighlighted@2x.png
  18. 0  Resources/{SSToolkit.bundle → Images}/gray-star.png
  19. 0  Resources/{SSToolkit.bundle → Images}/gray-star@2x.png
  20. 0  Resources/{SSToolkit.bundle → Images}/orange-star.png
  21. 0  Resources/{SSToolkit.bundle → Images}/orange-star@2x.png
  22. BIN  Resources/SSToolkit.bundle/SSViewControllerFormBackground.png
  23. BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowed.png
  24. BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowed@2x.png
  25. BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowedDown.png
  26. BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowedDown@2x.png
  27. BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowed.png
  28. BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowed@2x.png
  29. BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowedDown.png
  30. BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowedDown@2x.png
  31. BIN  Resources/SSToolkit.bundle/UISwitchButtonOff.png
  32. BIN  Resources/SSToolkit.bundle/UISwitchButtonOff@2x.png
  33. BIN  Resources/SSToolkit.bundle/UISwitchButtonOn.png
  34. BIN  Resources/SSToolkit.bundle/UISwitchButtonOn@2x.png
  35. BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowed.png
  36. BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowed@2x.png
  37. BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowedDown.png
  38. BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowedDown@2x.png
  39. BIN  Resources/SSToolkit.bundle/UISwitchTrackBlue.png
  40. BIN  Resources/SSToolkit.bundle/UISwitchTrackBlue@2x.png
  41. BIN  Resources/SSToolkit.bundle/UISwitchTrackClear.png
  42. BIN  Resources/SSToolkit.bundle/UISwitchTrackClear@2x.png
  43. BIN  Resources/SSToolkit.bundle/UISwitchTrackOrange.png
  44. BIN  Resources/SSToolkit.bundle/UISwitchTrackOrange@2x.png
  45. +46 −0 Resources/SSToolkitResources-Info.plist
  46. +31 −0 Resources/en.lproj/SSToolkit.strings
  47. +254 −38 SSToolkit.xcodeproj/project.pbxproj
  48. +15 −0 SSToolkit/NSBundle+SSToolkitAdditions.h
  49. +23 −0 SSToolkit/NSBundle+SSToolkitAdditions.m
  50. +12 −14 SSToolkit/NSDate+SSToolkitAdditions.h
  51. +53 −20 SSToolkit/NSDate+SSToolkitAdditions.m
  52. +1 −2  SSToolkit/SSCollectionViewController.h
  53. +0 −23 SSToolkit/SSModalViewController.h
  54. +0 −29 SSToolkit/SSNavigationController.h
  55. +0 −34 SSToolkit/SSNavigationController.m
  56. +1 −3 SSToolkit/SSRatingPickerViewController.h
  57. +0 −46 SSToolkit/SSSwitch.h
  58. +0 −395 SSToolkit/SSSwitch.m
  59. +0 −45 SSToolkit/SSTableViewController.h
  60. +0 −101 SSToolkit/SSTableViewController.m
  61. +0 −49 SSToolkit/SSToolkit.h
  62. +0 −38 SSToolkit/SSViewController.h
  63. +0 −329 SSToolkit/SSViewController.m
View
0  ...undle/SSAddressBarTextFieldBackground.png → ...mages/SSAddressBarTextFieldBackground.png
File renamed without changes
View
0  ...le/SSAddressBarTextFieldBackground@2x.png → ...es/SSAddressBarTextFieldBackground@2x.png
File renamed without changes
View
0  ...it.bundle/SSAddressBarTextFieldReload.png → ...es/Images/SSAddressBarTextFieldReload.png
File renamed without changes
View
0  ...bundle/SSAddressBarTextFieldReload@2x.png → ...Images/SSAddressBarTextFieldReload@2x.png
File renamed without changes
View
0  ...lkit.bundle/SSAddressBarTextFieldStop.png → ...rces/Images/SSAddressBarTextFieldStop.png
File renamed without changes
View
0  ...t.bundle/SSAddressBarTextFieldStop@2x.png → ...s/Images/SSAddressBarTextFieldStop@2x.png
File renamed without changes
View
0  ...urces/SSToolkit.bundle/SSVignetteiPad.png → Resources/Images/SSVignetteiPad.png
File renamed without changes
View
0  ...ces/SSToolkit.bundle/SSVignetteiPhone.png → Resources/Images/SSVignetteiPhone.png
File renamed without changes
View
0  .../SSToolkit.bundle/SSVignetteiPhone@2x.png → Resources/Images/SSVignetteiPhone@2x.png
File renamed without changes
View
0  ...s/SSToolkit.bundle/UISegmentBarButton.png → Resources/Images/UISegmentBarButton.png
File renamed without changes
View
0  ...SToolkit.bundle/UISegmentBarButton@2x.png → Resources/Images/UISegmentBarButton@2x.png
File renamed without changes
View
0  ....bundle/UISegmentBarButtonHighlighted.png → .../Images/UISegmentBarButtonHighlighted.png
File renamed without changes
View
0  ...ndle/UISegmentBarButtonHighlighted@2x.png → ...ages/UISegmentBarButtonHighlighted@2x.png
File renamed without changes
View
0  .../SSToolkit.bundle/UISegmentBarDivider.png → Resources/Images/UISegmentBarDivider.png
File renamed without changes
View
0  ...Toolkit.bundle/UISegmentBarDivider@2x.png → Resources/Images/UISegmentBarDivider@2x.png
File renamed without changes
View
0  ...bundle/UISegmentBarDividerHighlighted.png → ...Images/UISegmentBarDividerHighlighted.png
File renamed without changes
View
0  ...dle/UISegmentBarDividerHighlighted@2x.png → ...ges/UISegmentBarDividerHighlighted@2x.png
File renamed without changes
View
0  Resources/SSToolkit.bundle/gray-star.png → Resources/Images/gray-star.png
File renamed without changes
View
0  Resources/SSToolkit.bundle/gray-star@2x.png → Resources/Images/gray-star@2x.png
File renamed without changes
View
0  Resources/SSToolkit.bundle/orange-star.png → Resources/Images/orange-star.png
File renamed without changes
View
0  ...urces/SSToolkit.bundle/orange-star@2x.png → Resources/Images/orange-star@2x.png
File renamed without changes
View
BIN  Resources/SSToolkit.bundle/SSViewControllerFormBackground.png
Deleted file not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowed.png
Deleted file not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowed@2x.png
Deleted file not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowedDown.png
Deleted file not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonFullShadowedDown@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowed.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowed@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowedDown.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonLeftShadowedDown@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonOff.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonOff@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonOn.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonOn@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowed.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowed@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowedDown.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchButtonRightShadowedDown@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackBlue.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackBlue@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackClear.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackClear@2x.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackOrange.png
Diff not rendered
View
BIN  Resources/SSToolkit.bundle/UISwitchTrackOrange@2x.png
Diff not rendered
View
46 Resources/SSToolkitResources-Info.plist
@@ -0,0 +1,46 @@
+<?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>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.samsoffes.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</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>
+ <key>CFPlugInDynamicRegisterFunction</key>
+ <string></string>
+ <key>CFPlugInDynamicRegistration</key>
+ <string>NO</string>
+ <key>CFPlugInFactories</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <string>MyFactoryFunction</string>
+ </dict>
+ <key>CFPlugInTypes</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <array>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </array>
+ </dict>
+ <key>CFPlugInUnloadFunction</key>
+ <string></string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2012 Sam Soffes. All rights reserved.</string>
+</dict>
+</plist>
View
31 Resources/en.lproj/SSToolkit.strings
@@ -0,0 +1,31 @@
+//
+// SSToolkit.strings
+// SSToolkits
+//
+// Created by Sam Soffes on 3/22/12.
+// Copyright (c) 2012 Sam soffes. All rights reserved.
+//
+
+"1s" = "1s"; // one second
+"%ds" = "%ds"; // several seconds
+"1m" = "1m"; // one minutes
+"%dm" = "%dm"; // several minutes
+"1h" = "1h"; // one hours
+"%dh" = "%dh"; // several hours
+"1d" = "1d"; // one day
+"%dd" = "%dd"; // several days
+
+"less than a minute" = "less than a minute";
+"1 minute" = "1 minute";
+"less than %d seconds" = "less than %d seconds";
+"half a minute" = "half a minute";
+"less than a minute" = "less than a minute";
+"%d minutes" = "%d minutes";
+"about 1 hour" = "about 1 hour";
+"about %d hours" = "about %d hours";
+"1 day" = "1 day";
+"%d days" = "%d days";
+"about 1 month" = "about 1 month";
+"%d months" = "%d months";
+"about 1 year" = "about 1 year";
+"over %d years" = "over %d years";
View
292 SSToolkit.xcodeproj/project.pbxproj
@@ -9,8 +9,6 @@
/* Begin PBXBuildFile section */
9EB278B114BBC4360077194C /* SSConcurrentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E11121DC29A0085F81E /* SSConcurrentOperation.m */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
- B20AC0691267988600687143 /* SSTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B20AC0671267988600687143 /* SSTableViewController.h */; };
- B20AC06A1267988600687143 /* SSTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B20AC0681267988600687143 /* SSTableViewController.m */; };
B2136B3C13ABCC0C00FEBCFD /* SSBorderedView.h in Headers */ = {isa = PBXBuildFile; fileRef = B2136B3A13ABCC0C00FEBCFD /* SSBorderedView.h */; };
B2136B3D13ABCC0C00FEBCFD /* SSBorderedView.m in Sources */ = {isa = PBXBuildFile; fileRef = B2136B3B13ABCC0C00FEBCFD /* SSBorderedView.m */; };
B215045F10583A7300409ED4 /* SSToolkit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */; };
@@ -59,7 +57,6 @@
B24E9E5C121DC29A0085F81E /* SSLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E1E121DC29A0085F81E /* SSLineView.m */; };
B24E9E5D121DC29A0085F81E /* SSLoadingView.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E1F121DC29A0085F81E /* SSLoadingView.h */; };
B24E9E5E121DC29A0085F81E /* SSLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E20121DC29A0085F81E /* SSLoadingView.m */; };
- B24E9E65121DC29A0085F81E /* SSModalViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E27121DC29A0085F81E /* SSModalViewController.h */; };
B24E9E66121DC29A0085F81E /* SSPickerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E28121DC29A0085F81E /* SSPickerViewController.h */; };
B24E9E67121DC29A0085F81E /* SSPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E29121DC29A0085F81E /* SSPickerViewController.m */; };
B24E9E68121DC29A0085F81E /* SSPieProgressView.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E2A121DC29A0085F81E /* SSPieProgressView.h */; };
@@ -69,8 +66,6 @@
B24E9E6C121DC29A0085F81E /* SSTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E2E121DC29A0085F81E /* SSTextView.h */; };
B24E9E6D121DC29A0085F81E /* SSTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E2F121DC29A0085F81E /* SSTextView.m */; };
B24E9E6E121DC29A0085F81E /* SSToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E30121DC29A0085F81E /* SSToolkit.h */; };
- B24E9E6F121DC29A0085F81E /* SSViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E31121DC29A0085F81E /* SSViewController.h */; };
- B24E9E70121DC29A0085F81E /* SSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E32121DC29A0085F81E /* SSViewController.m */; };
B24E9E71121DC29A0085F81E /* SSWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E33121DC29A0085F81E /* SSWebView.h */; };
B24E9E72121DC29A0085F81E /* SSWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = B24E9E34121DC29A0085F81E /* SSWebView.m */; };
B24E9E73121DC29A0085F81E /* UIColor+SSToolkitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B24E9E35121DC29A0085F81E /* UIColor+SSToolkitAdditions.h */; };
@@ -108,14 +103,36 @@
B28219DE12FA8EB500BAF3C6 /* SSRatingPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = B28219DC12FA8EB500BAF3C6 /* SSRatingPicker.m */; };
B28C6D0712FBE5C400667755 /* SSRatingPickerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B28C6D0512FBE5C400667755 /* SSRatingPickerViewController.h */; };
B28C6D0812FBE5C400667755 /* SSRatingPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B28C6D0612FBE5C400667755 /* SSRatingPickerViewController.m */; };
- B2AAE65C1281B73E0068EE7F /* SSNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AAE65A1281B73E0068EE7F /* SSNavigationController.h */; };
- B2AAE65D1281B73E0068EE7F /* SSNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = B2AAE65B1281B73E0068EE7F /* SSNavigationController.m */; };
B2ABC6921329D14300521D20 /* SSCollectionViewItemTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = B2ABC6901329D14300521D20 /* SSCollectionViewItemTableViewCell.h */; };
B2ABC6931329D14300521D20 /* SSCollectionViewItemTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B2ABC6911329D14300521D20 /* SSCollectionViewItemTableViewCell.m */; };
B2AE1134126F963300534CF2 /* UIApplication+SSToolkitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AE1132126F963300534CF2 /* UIApplication+SSToolkitAdditions.h */; };
B2AE1135126F963300534CF2 /* UIApplication+SSToolkitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B2AE1133126F963300534CF2 /* UIApplication+SSToolkitAdditions.m */; };
- B2B3CED81296F637001BAC94 /* SSSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B3CED61296F637001BAC94 /* SSSwitch.h */; };
- B2B3CED91296F637001BAC94 /* SSSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = B2B3CED71296F637001BAC94 /* SSSwitch.m */; };
+ B2C507EC151BA64400E94614 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2C507EB151BA64400E94614 /* CoreFoundation.framework */; };
+ B2C507F2151BA64400E94614 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B2C507F0151BA64400E94614 /* InfoPlist.strings */; };
+ B2C50814151BAB4000E94614 /* NSBundle+SSToolkitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C50812151BAB4000E94614 /* NSBundle+SSToolkitAdditions.h */; };
+ B2C50815151BAB4000E94614 /* NSBundle+SSToolkitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = B2C50813151BAB4000E94614 /* NSBundle+SSToolkitAdditions.m */; };
+ B2C50816151BAE8800E94614 /* SSToolkit.strings in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080F151BA6C500E94614 /* SSToolkit.strings */; };
+ B2C50817151BAE9000E94614 /* gray-star.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507F9151BA6C000E94614 /* gray-star.png */; };
+ B2C50818151BAE9000E94614 /* gray-star@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FA151BA6C000E94614 /* gray-star@2x.png */; };
+ B2C50819151BAE9000E94614 /* orange-star.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FB151BA6C000E94614 /* orange-star.png */; };
+ B2C5081A151BAE9000E94614 /* orange-star@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FC151BA6C000E94614 /* orange-star@2x.png */; };
+ B2C5081B151BAE9000E94614 /* SSAddressBarTextFieldBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FD151BA6C000E94614 /* SSAddressBarTextFieldBackground.png */; };
+ B2C5081C151BAE9000E94614 /* SSAddressBarTextFieldBackground@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FE151BA6C000E94614 /* SSAddressBarTextFieldBackground@2x.png */; };
+ B2C5081D151BAE9000E94614 /* SSAddressBarTextFieldReload.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C507FF151BA6C000E94614 /* SSAddressBarTextFieldReload.png */; };
+ B2C5081E151BAE9000E94614 /* SSAddressBarTextFieldReload@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50800151BA6C000E94614 /* SSAddressBarTextFieldReload@2x.png */; };
+ B2C5081F151BAE9000E94614 /* SSAddressBarTextFieldStop.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50801151BA6C000E94614 /* SSAddressBarTextFieldStop.png */; };
+ B2C50820151BAE9000E94614 /* SSAddressBarTextFieldStop@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50802151BA6C000E94614 /* SSAddressBarTextFieldStop@2x.png */; };
+ B2C50822151BAE9000E94614 /* SSVignetteiPad.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50804151BA6C000E94614 /* SSVignetteiPad.png */; };
+ B2C50823151BAE9000E94614 /* SSVignetteiPhone.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50805151BA6C000E94614 /* SSVignetteiPhone.png */; };
+ B2C50824151BAE9000E94614 /* SSVignetteiPhone@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50806151BA6C000E94614 /* SSVignetteiPhone@2x.png */; };
+ B2C50825151BAE9000E94614 /* UISegmentBarButton.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50807151BA6C000E94614 /* UISegmentBarButton.png */; };
+ B2C50826151BAE9000E94614 /* UISegmentBarButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50808151BA6C000E94614 /* UISegmentBarButton@2x.png */; };
+ B2C50827151BAE9000E94614 /* UISegmentBarButtonHighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C50809151BA6C000E94614 /* UISegmentBarButtonHighlighted.png */; };
+ B2C50828151BAE9000E94614 /* UISegmentBarButtonHighlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080A151BA6C000E94614 /* UISegmentBarButtonHighlighted@2x.png */; };
+ B2C50829151BAE9000E94614 /* UISegmentBarDivider.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080B151BA6C000E94614 /* UISegmentBarDivider.png */; };
+ B2C5082A151BAE9000E94614 /* UISegmentBarDivider@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080C151BA6C000E94614 /* UISegmentBarDivider@2x.png */; };
+ B2C5082B151BAE9000E94614 /* UISegmentBarDividerHighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080D151BA6C000E94614 /* UISegmentBarDividerHighlighted.png */; };
+ B2C5082C151BAE9000E94614 /* UISegmentBarDividerHighlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2C5080E151BA6C000E94614 /* UISegmentBarDividerHighlighted@2x.png */; };
B2D8829413328EEF006B3F55 /* SSHUDWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = B2D8829213328EEF006B3F55 /* SSHUDWindow.h */; };
B2D8829513328EEF006B3F55 /* SSHUDWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = B2D8829313328EEF006B3F55 /* SSHUDWindow.m */; };
B2D883C01332D636006B3F55 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D883BF1332D636006B3F55 /* QuartzCore.framework */; };
@@ -146,8 +163,6 @@
/* Begin PBXFileReference section */
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- B20AC0671267988600687143 /* SSTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSTableViewController.h; sourceTree = "<group>"; };
- B20AC0681267988600687143 /* SSTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSTableViewController.m; sourceTree = "<group>"; };
B2136B3A13ABCC0C00FEBCFD /* SSBorderedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSBorderedView.h; sourceTree = "<group>"; };
B2136B3B13ABCC0C00FEBCFD /* SSBorderedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSBorderedView.m; sourceTree = "<group>"; };
B215045E10583A7300409ED4 /* SSToolkit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSToolkit_Prefix.pch; sourceTree = "<group>"; };
@@ -173,7 +188,6 @@
B23910C31357E08E00ADE21B /* URLCategoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLCategoryTest.m; sourceTree = "<group>"; };
B247ABAC1300930200971EC0 /* SSSegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSSegmentedControl.h; sourceTree = "<group>"; };
B247ABAD1300930200971EC0 /* SSSegmentedControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSSegmentedControl.m; sourceTree = "<group>"; };
- B24E9E01121DC2910085F81E /* SSToolkit.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SSToolkit.bundle; sourceTree = "<group>"; };
B24E9E05121DC29A0085F81E /* NSArray+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+SSToolkitAdditions.h"; sourceTree = "<group>"; };
B24E9E06121DC29A0085F81E /* NSArray+SSToolkitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+SSToolkitAdditions.m"; sourceTree = "<group>"; };
B24E9E07121DC29A0085F81E /* NSData+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+SSToolkitAdditions.h"; sourceTree = "<group>"; };
@@ -198,7 +212,6 @@
B24E9E1E121DC29A0085F81E /* SSLineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSLineView.m; sourceTree = "<group>"; };
B24E9E1F121DC29A0085F81E /* SSLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSLoadingView.h; sourceTree = "<group>"; };
B24E9E20121DC29A0085F81E /* SSLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSLoadingView.m; sourceTree = "<group>"; };
- B24E9E27121DC29A0085F81E /* SSModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSModalViewController.h; sourceTree = "<group>"; };
B24E9E28121DC29A0085F81E /* SSPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSPickerViewController.h; sourceTree = "<group>"; };
B24E9E29121DC29A0085F81E /* SSPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSPickerViewController.m; sourceTree = "<group>"; };
B24E9E2A121DC29A0085F81E /* SSPieProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSPieProgressView.h; sourceTree = "<group>"; };
@@ -208,8 +221,6 @@
B24E9E2E121DC29A0085F81E /* SSTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSTextView.h; sourceTree = "<group>"; };
B24E9E2F121DC29A0085F81E /* SSTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSTextView.m; sourceTree = "<group>"; };
B24E9E30121DC29A0085F81E /* SSToolkit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSToolkit.h; sourceTree = "<group>"; };
- B24E9E31121DC29A0085F81E /* SSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSViewController.h; sourceTree = "<group>"; };
- B24E9E32121DC29A0085F81E /* SSViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSViewController.m; sourceTree = "<group>"; };
B24E9E33121DC29A0085F81E /* SSWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSWebView.h; sourceTree = "<group>"; };
B24E9E34121DC29A0085F81E /* SSWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSWebView.m; sourceTree = "<group>"; };
B24E9E35121DC29A0085F81E /* UIColor+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+SSToolkitAdditions.h"; sourceTree = "<group>"; };
@@ -247,16 +258,42 @@
B290355913B9236E00CCAFC9 /* SSAnimatedImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSAnimatedImageView.m; sourceTree = "<group>"; };
B2A5D4D5135873B300AC4BA7 /* ColorCategoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorCategoryTest.m; sourceTree = "<group>"; };
B2A5D4DD1358748700AC4BA7 /* ControlCategoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ControlCategoryTest.m; sourceTree = "<group>"; };
- B2AAE65A1281B73E0068EE7F /* SSNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSNavigationController.h; sourceTree = "<group>"; };
- B2AAE65B1281B73E0068EE7F /* SSNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSNavigationController.m; sourceTree = "<group>"; };
B2ABC6901329D14300521D20 /* SSCollectionViewItemTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSCollectionViewItemTableViewCell.h; sourceTree = "<group>"; };
B2ABC6911329D14300521D20 /* SSCollectionViewItemTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSCollectionViewItemTableViewCell.m; sourceTree = "<group>"; };
B2AE1132126F963300534CF2 /* UIApplication+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplication+SSToolkitAdditions.h"; sourceTree = "<group>"; };
B2AE1133126F963300534CF2 /* UIApplication+SSToolkitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+SSToolkitAdditions.m"; sourceTree = "<group>"; };
- B2B3CED61296F637001BAC94 /* SSSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSSwitch.h; sourceTree = "<group>"; };
- B2B3CED71296F637001BAC94 /* SSSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSSwitch.m; sourceTree = "<group>"; };
B2B456FB139078B80060C279 /* SSCollectionViewExtremityTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSCollectionViewExtremityTableViewCell.h; sourceTree = "<group>"; };
B2B456FC139078B80060C279 /* SSCollectionViewExtremityTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSCollectionViewExtremityTableViewCell.m; sourceTree = "<group>"; };
+ B2C507EA151BA64400E94614 /* SSToolkitResources.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SSToolkitResources.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
+ B2C507EB151BA64400E94614 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
+ B2C507EF151BA64400E94614 /* SSToolkitResources-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SSToolkitResources-Info.plist"; sourceTree = "<group>"; };
+ B2C507F1151BA64400E94614 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ B2C507F3151BA64400E94614 /* SSToolkitResources-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SSToolkitResources-Prefix.pch"; sourceTree = "<group>"; };
+ B2C507F9151BA6C000E94614 /* gray-star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gray-star.png"; sourceTree = "<group>"; };
+ B2C507FA151BA6C000E94614 /* gray-star@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gray-star@2x.png"; sourceTree = "<group>"; };
+ B2C507FB151BA6C000E94614 /* orange-star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "orange-star.png"; sourceTree = "<group>"; };
+ B2C507FC151BA6C000E94614 /* orange-star@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "orange-star@2x.png"; sourceTree = "<group>"; };
+ B2C507FD151BA6C000E94614 /* SSAddressBarTextFieldBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SSAddressBarTextFieldBackground.png; sourceTree = "<group>"; };
+ B2C507FE151BA6C000E94614 /* SSAddressBarTextFieldBackground@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SSAddressBarTextFieldBackground@2x.png"; sourceTree = "<group>"; };
+ B2C507FF151BA6C000E94614 /* SSAddressBarTextFieldReload.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SSAddressBarTextFieldReload.png; sourceTree = "<group>"; };
+ B2C50800151BA6C000E94614 /* SSAddressBarTextFieldReload@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SSAddressBarTextFieldReload@2x.png"; sourceTree = "<group>"; };
+ B2C50801151BA6C000E94614 /* SSAddressBarTextFieldStop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SSAddressBarTextFieldStop.png; sourceTree = "<group>"; };
+ B2C50802151BA6C000E94614 /* SSAddressBarTextFieldStop@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SSAddressBarTextFieldStop@2x.png"; sourceTree = "<group>"; };
+ B2C50804151BA6C000E94614 /* SSVignetteiPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SSVignetteiPad.png; sourceTree = "<group>"; };
+ B2C50805151BA6C000E94614 /* SSVignetteiPhone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SSVignetteiPhone.png; sourceTree = "<group>"; };
+ B2C50806151BA6C000E94614 /* SSVignetteiPhone@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SSVignetteiPhone@2x.png"; sourceTree = "<group>"; };
+ B2C50807151BA6C000E94614 /* UISegmentBarButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UISegmentBarButton.png; sourceTree = "<group>"; };
+ B2C50808151BA6C000E94614 /* UISegmentBarButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UISegmentBarButton@2x.png"; sourceTree = "<group>"; };
+ B2C50809151BA6C000E94614 /* UISegmentBarButtonHighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UISegmentBarButtonHighlighted.png; sourceTree = "<group>"; };
+ B2C5080A151BA6C000E94614 /* UISegmentBarButtonHighlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UISegmentBarButtonHighlighted@2x.png"; sourceTree = "<group>"; };
+ B2C5080B151BA6C000E94614 /* UISegmentBarDivider.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UISegmentBarDivider.png; sourceTree = "<group>"; };
+ B2C5080C151BA6C000E94614 /* UISegmentBarDivider@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UISegmentBarDivider@2x.png"; sourceTree = "<group>"; };
+ B2C5080D151BA6C000E94614 /* UISegmentBarDividerHighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UISegmentBarDividerHighlighted.png; sourceTree = "<group>"; };
+ B2C5080E151BA6C000E94614 /* UISegmentBarDividerHighlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UISegmentBarDividerHighlighted@2x.png"; sourceTree = "<group>"; };
+ B2C50810151BA6C500E94614 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/SSToolkit.strings; sourceTree = "<group>"; };
+ B2C50811151BA6D500E94614 /* SSToolkitResources-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SSToolkitResources-Info.plist"; sourceTree = "<group>"; };
+ B2C50812151BAB4000E94614 /* NSBundle+SSToolkitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+SSToolkitAdditions.h"; sourceTree = "<group>"; };
+ B2C50813151BAB4000E94614 /* NSBundle+SSToolkitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+SSToolkitAdditions.m"; sourceTree = "<group>"; };
B2D8829213328EEF006B3F55 /* SSHUDWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSHUDWindow.h; sourceTree = "<group>"; };
B2D8829313328EEF006B3F55 /* SSHUDWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSHUDWindow.m; sourceTree = "<group>"; };
B2D883BF1332D636006B3F55 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = iphoneos3.0/System/Library/Frameworks/QuartzCore.framework; sourceTree = "<group>"; };
@@ -290,6 +327,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ B2C507E7151BA64400E94614 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ B2C507EC151BA64400E94614 /* CoreFoundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -308,6 +353,7 @@
children = (
D2AAC07E0554694100DB518D /* libSSToolkit.a */,
B239101D1357DC3E00ADE21B /* SSToolkitTests.app */,
+ B2C507EA151BA64400E94614 /* SSToolkitResources.bundle */,
);
name = Products;
sourceTree = "<group>";
@@ -319,6 +365,7 @@
B215045D10583A7300409ED4 /* Other Sources */,
B22A2A7F10B4908D00EA6CD9 /* Resources */,
B23910541357DC7D00ADE21B /* Tests */,
+ B2C507ED151BA64400E94614 /* SSToolkitResources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
);
@@ -331,6 +378,7 @@
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
B2D883BF1332D636006B3F55 /* QuartzCore.framework */,
B215051110583BBB00409ED4 /* UIKit.framework */,
+ B2C507EB151BA64400E94614 /* CoreFoundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -346,7 +394,9 @@
B22A2A7F10B4908D00EA6CD9 /* Resources */ = {
isa = PBXGroup;
children = (
- B24E9E01121DC2910085F81E /* SSToolkit.bundle */,
+ B2C50811151BA6D500E94614 /* SSToolkitResources-Info.plist */,
+ B2C5080F151BA6C500E94614 /* SSToolkit.strings */,
+ B2C507F8151BA6C000E94614 /* Images */,
);
path = Resources;
sourceTree = "<group>";
@@ -423,6 +473,8 @@
B24E9E0C121DC29A0085F81E /* NSString+SSToolkitAdditions.m */,
B24E9E0D121DC29A0085F81E /* NSURL+SSToolkitAdditions.h */,
B24E9E0E121DC29A0085F81E /* NSURL+SSToolkitAdditions.m */,
+ B2C50812151BAB4000E94614 /* NSBundle+SSToolkitAdditions.h */,
+ B2C50813151BAB4000E94614 /* NSBundle+SSToolkitAdditions.m */,
);
name = Foundation;
sourceTree = "<group>";
@@ -488,17 +540,10 @@
children = (
B267D3431226CE0400B66519 /* SSCollectionViewController.h */,
B267D3441226CE0400B66519 /* SSCollectionViewController.m */,
- B2AAE65A1281B73E0068EE7F /* SSNavigationController.h */,
- B2AAE65B1281B73E0068EE7F /* SSNavigationController.m */,
- B24E9E27121DC29A0085F81E /* SSModalViewController.h */,
B24E9E28121DC29A0085F81E /* SSPickerViewController.h */,
B24E9E29121DC29A0085F81E /* SSPickerViewController.m */,
B28C6D0512FBE5C400667755 /* SSRatingPickerViewController.h */,
B28C6D0612FBE5C400667755 /* SSRatingPickerViewController.m */,
- B20AC0671267988600687143 /* SSTableViewController.h */,
- B20AC0681267988600687143 /* SSTableViewController.m */,
- B24E9E31121DC29A0085F81E /* SSViewController.h */,
- B24E9E32121DC29A0085F81E /* SSViewController.m */,
);
name = "View Controllers";
sourceTree = "<group>";
@@ -516,8 +561,6 @@
B28219DC12FA8EB500BAF3C6 /* SSRatingPicker.m */,
B247ABAC1300930200971EC0 /* SSSegmentedControl.h */,
B247ABAD1300930200971EC0 /* SSSegmentedControl.m */,
- B2B3CED61296F637001BAC94 /* SSSwitch.h */,
- B2B3CED71296F637001BAC94 /* SSSwitch.m */,
);
name = Controls;
sourceTree = "<group>";
@@ -558,6 +601,52 @@
name = Private;
sourceTree = "<group>";
};
+ B2C507ED151BA64400E94614 /* SSToolkitResources */ = {
+ isa = PBXGroup;
+ children = (
+ B2C507EE151BA64400E94614 /* Supporting Files */,
+ );
+ path = SSToolkitResources;
+ sourceTree = "<group>";
+ };
+ B2C507EE151BA64400E94614 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ B2C507EF151BA64400E94614 /* SSToolkitResources-Info.plist */,
+ B2C507F0151BA64400E94614 /* InfoPlist.strings */,
+ B2C507F3151BA64400E94614 /* SSToolkitResources-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ B2C507F8151BA6C000E94614 /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ B2C507F9151BA6C000E94614 /* gray-star.png */,
+ B2C507FA151BA6C000E94614 /* gray-star@2x.png */,
+ B2C507FB151BA6C000E94614 /* orange-star.png */,
+ B2C507FC151BA6C000E94614 /* orange-star@2x.png */,
+ B2C507FD151BA6C000E94614 /* SSAddressBarTextFieldBackground.png */,
+ B2C507FE151BA6C000E94614 /* SSAddressBarTextFieldBackground@2x.png */,
+ B2C507FF151BA6C000E94614 /* SSAddressBarTextFieldReload.png */,
+ B2C50800151BA6C000E94614 /* SSAddressBarTextFieldReload@2x.png */,
+ B2C50801151BA6C000E94614 /* SSAddressBarTextFieldStop.png */,
+ B2C50802151BA6C000E94614 /* SSAddressBarTextFieldStop@2x.png */,
+ B2C50804151BA6C000E94614 /* SSVignetteiPad.png */,
+ B2C50805151BA6C000E94614 /* SSVignetteiPhone.png */,
+ B2C50806151BA6C000E94614 /* SSVignetteiPhone@2x.png */,
+ B2C50807151BA6C000E94614 /* UISegmentBarButton.png */,
+ B2C50808151BA6C000E94614 /* UISegmentBarButton@2x.png */,
+ B2C50809151BA6C000E94614 /* UISegmentBarButtonHighlighted.png */,
+ B2C5080A151BA6C000E94614 /* UISegmentBarButtonHighlighted@2x.png */,
+ B2C5080B151BA6C000E94614 /* UISegmentBarDivider.png */,
+ B2C5080C151BA6C000E94614 /* UISegmentBarDivider@2x.png */,
+ B2C5080D151BA6C000E94614 /* UISegmentBarDividerHighlighted.png */,
+ B2C5080E151BA6C000E94614 /* UISegmentBarDividerHighlighted@2x.png */,
+ );
+ path = Images;
+ sourceTree = "<group>";
+ };
B2EA9F5B12F4A5B900C929D6 /* Cells */ = {
isa = PBXGroup;
children = (
@@ -588,13 +677,11 @@
B24E9E59121DC29A0085F81E /* SSLabel.h in Headers */,
B24E9E5B121DC29A0085F81E /* SSLineView.h in Headers */,
B24E9E5D121DC29A0085F81E /* SSLoadingView.h in Headers */,
- B24E9E65121DC29A0085F81E /* SSModalViewController.h in Headers */,
B24E9E66121DC29A0085F81E /* SSPickerViewController.h in Headers */,
B24E9E68121DC29A0085F81E /* SSPieProgressView.h in Headers */,
B24E9E6A121DC29A0085F81E /* SSTextField.h in Headers */,
B24E9E6C121DC29A0085F81E /* SSTextView.h in Headers */,
B24E9E6E121DC29A0085F81E /* SSToolkit.h in Headers */,
- B24E9E6F121DC29A0085F81E /* SSViewController.h in Headers */,
B24E9E71121DC29A0085F81E /* SSWebView.h in Headers */,
B24E9E73121DC29A0085F81E /* UIColor+SSToolkitAdditions.h in Headers */,
B24E9E75121DC29A0085F81E /* UIControl+SSToolkitAdditions.h in Headers */,
@@ -607,10 +694,7 @@
B27B1A2212241D6F00111EA2 /* SSCollectionViewItem.h in Headers */,
B267D3451226CE0400B66519 /* SSCollectionViewController.h in Headers */,
B227D2EA124931590078A059 /* NSDictionary+SSToolkitAdditions.h in Headers */,
- B20AC0691267988600687143 /* SSTableViewController.h in Headers */,
B2AE1134126F963300534CF2 /* UIApplication+SSToolkitAdditions.h in Headers */,
- B2AAE65C1281B73E0068EE7F /* SSNavigationController.h in Headers */,
- B2B3CED81296F637001BAC94 /* SSSwitch.h in Headers */,
B2EA9F5E12F4A5C900C929D6 /* SSBadgeTableViewCell.h in Headers */,
B2EA9F6212F4A5E100C929D6 /* SSBadgeView.h in Headers */,
B28218BE12FA6AE100BAF3C6 /* SSToolkitDefines.h in Headers */,
@@ -630,6 +714,7 @@
B2136B3C13ABCC0C00FEBCFD /* SSBorderedView.h in Headers */,
B280E25F13BA76A300FCDA5C /* SSAnimatedImageView.h in Headers */,
B229B468144CE2F500F71626 /* SSCollectionViewTableView.h in Headers */,
+ B2C50814151BAB4000E94614 /* NSBundle+SSToolkitAdditions.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -654,6 +739,23 @@
productReference = B239101D1357DC3E00ADE21B /* SSToolkitTests.app */;
productType = "com.apple.product-type.application";
};
+ B2C507E9151BA64400E94614 /* SSToolkitResources */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = B2C507F6151BA64400E94614 /* Build configuration list for PBXNativeTarget "SSToolkitResources" */;
+ buildPhases = (
+ B2C507E6151BA64400E94614 /* Sources */,
+ B2C507E7151BA64400E94614 /* Frameworks */,
+ B2C507E8151BA64400E94614 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SSToolkitResources;
+ productName = SSToolkitResources;
+ productReference = B2C507EA151BA64400E94614 /* SSToolkitResources.bundle */;
+ productType = "com.apple.product-type.bundle";
+ };
D2AAC07D0554694100DB518D /* SSToolkit */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "SSToolkit" */;
@@ -677,6 +779,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
+ CLASSPREFIX = SS;
LastUpgradeCheck = 0440;
ORGANIZATIONNAME = "Sam Soffes";
};
@@ -689,6 +792,7 @@
Japanese,
French,
German,
+ en,
);
mainGroup = 0867D691FE84028FC02AAC07 /* TWToolkit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
@@ -697,6 +801,7 @@
targets = (
D2AAC07D0554694100DB518D /* SSToolkit */,
B239101C1357DC3E00ADE21B /* SSToolkitTests */,
+ B2C507E9151BA64400E94614 /* SSToolkitResources */,
);
};
/* End PBXProject section */
@@ -709,6 +814,36 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ B2C507E8151BA64400E94614 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ B2C507F2151BA64400E94614 /* InfoPlist.strings in Resources */,
+ B2C50816151BAE8800E94614 /* SSToolkit.strings in Resources */,
+ B2C50817151BAE9000E94614 /* gray-star.png in Resources */,
+ B2C50818151BAE9000E94614 /* gray-star@2x.png in Resources */,
+ B2C50819151BAE9000E94614 /* orange-star.png in Resources */,
+ B2C5081A151BAE9000E94614 /* orange-star@2x.png in Resources */,
+ B2C5081B151BAE9000E94614 /* SSAddressBarTextFieldBackground.png in Resources */,
+ B2C5081C151BAE9000E94614 /* SSAddressBarTextFieldBackground@2x.png in Resources */,
+ B2C5081D151BAE9000E94614 /* SSAddressBarTextFieldReload.png in Resources */,
+ B2C5081E151BAE9000E94614 /* SSAddressBarTextFieldReload@2x.png in Resources */,
+ B2C5081F151BAE9000E94614 /* SSAddressBarTextFieldStop.png in Resources */,
+ B2C50820151BAE9000E94614 /* SSAddressBarTextFieldStop@2x.png in Resources */,
+ B2C50822151BAE9000E94614 /* SSVignetteiPad.png in Resources */,
+ B2C50823151BAE9000E94614 /* SSVignetteiPhone.png in Resources */,
+ B2C50824151BAE9000E94614 /* SSVignetteiPhone@2x.png in Resources */,
+ B2C50825151BAE9000E94614 /* UISegmentBarButton.png in Resources */,
+ B2C50826151BAE9000E94614 /* UISegmentBarButton@2x.png in Resources */,
+ B2C50827151BAE9000E94614 /* UISegmentBarButtonHighlighted.png in Resources */,
+ B2C50828151BAE9000E94614 /* UISegmentBarButtonHighlighted@2x.png in Resources */,
+ B2C50829151BAE9000E94614 /* UISegmentBarDivider.png in Resources */,
+ B2C5082A151BAE9000E94614 /* UISegmentBarDivider@2x.png in Resources */,
+ B2C5082B151BAE9000E94614 /* UISegmentBarDividerHighlighted.png in Resources */,
+ B2C5082C151BAE9000E94614 /* UISegmentBarDividerHighlighted@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -729,6 +864,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ B2C507E6151BA64400E94614 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -747,7 +889,6 @@
B24E9E69121DC29A0085F81E /* SSPieProgressView.m in Sources */,
B24E9E6B121DC29A0085F81E /* SSTextField.m in Sources */,
B24E9E6D121DC29A0085F81E /* SSTextView.m in Sources */,
- B24E9E70121DC29A0085F81E /* SSViewController.m in Sources */,
B24E9E72121DC29A0085F81E /* SSWebView.m in Sources */,
B24E9E74121DC29A0085F81E /* UIColor+SSToolkitAdditions.m in Sources */,
B24E9E76121DC29A0085F81E /* UIControl+SSToolkitAdditions.m in Sources */,
@@ -761,10 +902,7 @@
B27B1A2312241D6F00111EA2 /* SSCollectionViewItem.m in Sources */,
B267D3461226CE0400B66519 /* SSCollectionViewController.m in Sources */,
B227D2EB124931590078A059 /* NSDictionary+SSToolkitAdditions.m in Sources */,
- B20AC06A1267988600687143 /* SSTableViewController.m in Sources */,
B2AE1135126F963300534CF2 /* UIApplication+SSToolkitAdditions.m in Sources */,
- B2AAE65D1281B73E0068EE7F /* SSNavigationController.m in Sources */,
- B2B3CED91296F637001BAC94 /* SSSwitch.m in Sources */,
B2EA9F5F12F4A5C900C929D6 /* SSBadgeTableViewCell.m in Sources */,
B2EA9F6312F4A5E100C929D6 /* SSBadgeView.m in Sources */,
B28218BF12FA6AE100BAF3C6 /* SSToolkitDefines.m in Sources */,
@@ -783,6 +921,7 @@
B280E25D13BA769C00FCDA5C /* SSAnimatedImageView.m in Sources */,
B229B469144CE2F500F71626 /* SSCollectionViewTableView.m in Sources */,
9EB278B114BBC4360077194C /* SSConcurrentOperation.m in Sources */,
+ B2C50815151BAB4000E94614 /* NSBundle+SSToolkitAdditions.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -796,6 +935,25 @@
};
/* End PBXTargetDependency section */
+/* Begin PBXVariantGroup section */
+ B2C507F0151BA64400E94614 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ B2C507F1151BA64400E94614 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ B2C5080F151BA6C500E94614 /* SSToolkit.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ B2C50810151BA6C500E94614 /* en */,
+ );
+ name = SSToolkit.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
@@ -984,6 +1142,56 @@
};
name = Release;
};
+ B2C507F4151BA64400E94614 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SSToolkitResources/SSToolkitResources-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ INFOPLIST_FILE = "Resources/SSToolkitResources-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ WRAPPER_EXTENSION = bundle;
+ };
+ name = Debug;
+ };
+ B2C507F5151BA64400E94614 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SSToolkitResources/SSToolkitResources-Prefix.pch";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ INFOPLIST_FILE = "Resources/SSToolkitResources-Info.plist";
+ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ WRAPPER_EXTENSION = bundle;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -1014,6 +1222,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ B2C507F6151BA64400E94614 /* Build configuration list for PBXNativeTarget "SSToolkitResources" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ B2C507F4151BA64400E94614 /* Debug */,
+ B2C507F5151BA64400E94614 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
View
15 SSToolkit/NSBundle+SSToolkitAdditions.h
@@ -0,0 +1,15 @@
+//
+// NSBundle+SSToolkitAdditions.h
+// SSToolkit
+//
+// Created by Sam Soffes on 3/22/12.
+// Copyright (c) 2012 Sam Soffes. All rights reserved.
+//
+
+#define SSToolkitLocalizedString(key) [[NSBundle ssToolkitBundle] localizedStringForKey:(key) value:@"" table:@"SSToolkit"]
+
+@interface NSBundle (SSToolkitAdditions)
+
++ (NSBundle *)ssToolkitBundle;
+
+@end
View
23 SSToolkit/NSBundle+SSToolkitAdditions.m
@@ -0,0 +1,23 @@
+//
+// NSBundle+SSToolkitAdditions.m
+// SSToolkit
+//
+// Created by Sam Soffes on 3/22/12.
+// Copyright (c) 2012 Sam Soffes. All rights reserved.
+//
+
+#import "NSBundle+SSToolkitAdditions.h"
+
+@implementation NSBundle (SSToolkitAdditions)
+
++ (NSBundle *)ssToolkitBundle {
+ static NSBundle *ssToolkitBundle = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"SSToolkitResources.bundle"];
+ ssToolkitBundle = [[NSBundle alloc] initWithPath:bundlePath];
+ });
+ return ssToolkitBundle;
+}
+
+@end
View
26 SSToolkit/NSDate+SSToolkitAdditions.h
@@ -21,10 +21,6 @@
@param iso8601String An ISO8601 string
@return Date represented by the ISO8601 string
-
- @bug [Issue #56](https://github.com/samsoffes/sstoolkit/issues/56): Currently this method doesn't work with
- strings that include a timezone as anything other than "Z" like this one
- "2011-02-01T10:57:55-08:00".
*/
+ (NSDate *)dateFromISO8601String:(NSString *)iso8601String;
@@ -41,6 +37,18 @@
///---------------
/**
+ Returns a string representing the time interval from now in words.
+
+ The strings produced by this method will be similar to produced by Twitter for iPhone or Tweetbot in the top right of
+ the tweet cells.
+
+ Internally, this does not use `timeAgoInWordsFromTimeInterval:includingSeconds:`.
+
+ @return A string representing the time interval from now in words
+ */
+- (NSString *)briefTimeAgoInWords;
+
+/**
Returns a string representing a time interval in words.
The strings produced by this method will be similar to produced by ActiveSupport's `time_ago_in_words` helper method.
@@ -82,14 +90,4 @@
*/
- (NSString *)timeAgoInWordsIncludingSeconds:(BOOL)includeSeconds;
-/**
- Returns a string representing the time interval from now in words.
-
- The strings produced by this method will be similar to produced by Twitter for iPhone in the top right of cells.
- Internally, this does not use `timeAgoInWordsFromTimeInterval:includingSeconds:`.
-
- @return A string representing the time interval from now in words
- */
-- (NSString *)briefTimeAgoInWords;
-
@end
View
73 SSToolkit/NSDate+SSToolkitAdditions.m
@@ -7,6 +7,7 @@
//
#import "NSDate+SSToolkitAdditions.h"
+#import "NSBundle+SSToolkitAdditions.h"
#include <time.h>
#include <xlocale.h>
@@ -81,7 +82,58 @@ - (NSString *)ISO8601String {
}
-// Adapted from http://github.com/gabriel/gh-kit/blob/master/Classes/GHNSString+TimeInterval.m
+- (NSString *)briefTimeAgoInWords {
+ NSTimeInterval seconds = fabs([self timeIntervalSinceNow]);
+
+ // Seconds
+ if (seconds < 60.0) {
+ if (seconds < 2.0) {
+ return SSToolkitLocalizedString(@"1s");
+ }
+ return [NSString stringWithFormat:SSToolkitLocalizedString(@"%ds"), (NSInteger)seconds];
+ }
+
+ NSTimeInterval minutes = round(seconds / 60.0);
+
+ // Minutes
+ if (minutes >= 0.0 && minutes < 60.0) {
+ if (minutes < 2.0) {
+ return SSToolkitLocalizedString(@"1m");
+ }
+ return [NSString stringWithFormat:SSToolkitLocalizedString(@"%dm"), (NSInteger)minutes];
+ }
+
+ // Hours
+ else if (minutes >= 60.0 && minutes < 1440.0) {
+ NSInteger hours = (NSInteger)round(minutes / 60.0);
+ if (hours < 2) {
+ return SSToolkitLocalizedString(@"1h");
+ }
+ return [NSString stringWithFormat:SSToolkitLocalizedString(@"%dh"), hours];
+ }
+
+ // Days
+ else if (minutes >= 1440.0 && minutes < 525600.0) {
+ NSInteger days = (NSInteger)round(minutes / 1440.0);
+ if (days < 2) {
+ return SSToolkitLocalizedString(@"1d");
+ }
+ return [NSString stringWithFormat:SSToolkitLocalizedString(@"%dd"), days];
+ }
+
+ // Years
+ else if (minutes >= 525600.0) {
+ NSInteger years = (NSInteger)round(minutes / 525600.0);
+ if (years < 2) {
+ return SSToolkitLocalizedString(@"1y");
+ }
+ return [NSString stringWithFormat:SSToolkitLocalizedString(@"%dy"), years];
+ }
+
+ return nil;
+}
+
+
+ (NSString *)timeAgoInWordsFromTimeInterval:(NSTimeInterval)intervalInSeconds includingSeconds:(BOOL)includeSeconds {
NSTimeInterval intervalInMinutes = round(intervalInSeconds / 60.0f);
@@ -125,25 +177,6 @@ + (NSString *)timeAgoInWordsFromTimeInterval:(NSTimeInterval)intervalInSeconds i
}
-- (NSString *)briefTimeAgoInWords {
- NSTimeInterval intervalInSeconds = fabs([self timeIntervalSinceNow]);
- NSTimeInterval intervalInMinutes = round(intervalInSeconds / 60.0f);
-
- if (intervalInMinutes >= 0 && intervalInMinutes < 60) {
- return [NSString stringWithFormat:@"%.0fm", intervalInMinutes];
- } else if (intervalInMinutes >= 60 && intervalInMinutes < 1440) {
- return [NSString stringWithFormat:@"%.0fh", round(intervalInMinutes/60.0f)];
- } else if (intervalInMinutes >= 1440 && intervalInMinutes <= 43199) {
- return [NSString stringWithFormat:@"%.0fd", round(intervalInMinutes/1440.0f)];
- } else if (intervalInMinutes >= 43200 && intervalInMinutes <= 525599) {
- return [NSString stringWithFormat:@"%.0fmo", round(intervalInMinutes/43200.0f)];
- } else if (intervalInMinutes >= 525600) {
- return [NSString stringWithFormat:@"%.0fy", round(intervalInMinutes/525600.0f)];
- }
- return nil;
-}
-
-
- (NSString *)timeAgoInWords {
return [self timeAgoInWordsIncludingSeconds:YES];
}
View
3  SSToolkit/SSCollectionViewController.h
@@ -6,13 +6,12 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-#import "SSViewController.h"
#import "SSCollectionView.h"
/**
Creates a controller object that manages a collection view.
*/
-@interface SSCollectionViewController : SSViewController <SSCollectionViewDataSource, SSCollectionViewDelegate>
+@interface SSCollectionViewController : UIViewController <SSCollectionViewDataSource, SSCollectionViewDelegate>
/**
Returns the table view managed by the controller object. (read-only)
View
23 SSToolkit/SSModalViewController.h
@@ -1,23 +0,0 @@
-//
-// SSModalViewController.h
-// SSToolkit
-//
-// Created by Sam Soffes on 7/14/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-@class SSViewController;
-
-@protocol SSModalViewController <NSObject>
-
-@required
-
-@property (nonatomic, assign) SSViewController *modalParentViewController;
-
-@optional
-
-- (BOOL)dismissCustomModalOnVignetteTap;
-- (CGSize)contentSizeForViewInCustomModal;
-- (CGPoint)originOffsetForViewInCustomModal;
-
-@end
View
29 SSToolkit/SSNavigationController.h
@@ -1,29 +0,0 @@
-//
-// SSNavigationController.h
-// SSToolkit
-//
-// Created by Sam Soffes on 10/15/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSModalViewController.h"
-
-@class SSViewController;
-
-/**
- UINavigationController subclass that comforms to the SSModalViewController protocol.
-
- This class contains a dirty hack to position it's navigation bar correctly when in a custom modal that is created with
- the SSViewController class.
-
- @see SSViewController
- @see SSModalViewController
- */
-@interface SSNavigationController : UINavigationController <SSModalViewController>
-
-@property (nonatomic, assign) SSViewController *modalParentViewController;
-@property (nonatomic, assign) BOOL dismissCustomModalOnVignetteTap;
-@property (nonatomic, assign) CGSize contentSizeForViewInCustomModal;
-@property (nonatomic, assign) CGPoint originOffsetForViewInCustomModal;
-
-@end
View
34 SSToolkit/SSNavigationController.m
@@ -1,34 +0,0 @@
-//
-// SSNavigationController.m
-// SSToolkit
-//
-// Created by Sam Soffes on 10/15/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSNavigationController.h"
-#import "SSViewController.h"
-
-@implementation SSNavigationController
-
-#pragma mark - Accessors
-
-@synthesize modalParentViewController = _modalParentViewController;
-@synthesize dismissCustomModalOnVignetteTap = _dismissCustomModalOnVignetteTap;
-@synthesize contentSizeForViewInCustomModal = _contentSizeForViewInCustomModal;
-@synthesize originOffsetForViewInCustomModal = _originOffsetForViewInCustomModal;
-
-
-#pragma mark - UIViewController
-
-- (void) viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- // Move nav bar up. This makes me cry.
- if (self.modalParentViewController) {
- UIView *navBar = [[self.view subviews] objectAtIndex:1];
- navBar.frame = CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 44.0f);
- }
-}
-
-@end
View
4 SSToolkit/SSRatingPickerViewController.h
@@ -6,8 +6,6 @@
// Copyright 2011 Sam Soffes. All rights reserved.
//
-#import "SSViewController.h"
-
@class SSRatingPickerScrollView;
@class SSRatingPicker;
@class SSTextField;
@@ -16,7 +14,7 @@
/**
Creates a controller object that manages a rating picker.
*/
-@interface SSRatingPickerViewController : SSViewController
+@interface SSRatingPickerViewController : UIViewController
///----------------------------------
/// @name Accessing the Rating Picker
View
46 SSToolkit/SSSwitch.h
@@ -1,46 +0,0 @@
-//
-// SSSwitch.h
-// SSToolkit
-//
-// Created by Sam Soffes on 11/19/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-typedef enum {
- SSSwitchStyleDefault,
- SSSwitchStyleAirplane
-} SSSwitchStyle;
-
-typedef enum {
- SSSwitchLabelStyleDefault, // Uses text in English and view for all others
- SSSwitchLabelStyleAlwaysText, // Always use text
- SSSwitchLabelStyleAlwaysView, // Always use views
-} SSSwitchLabelStyle;
-
-@interface SSSwitch : UIControl
-
-@property (nonatomic, assign, getter=isOn) BOOL on;
-@property (nonatomic, assign) SSSwitchStyle style;
-@property (nonatomic, retain, readonly) UIButton *handle;
-@property (nonatomic, retain) UIImage *leftHandleImage;
-@property (nonatomic, retain) UIImage *leftHandleImageHighlighted;
-@property (nonatomic, retain) UIImage *centerHandleImage;
-@property (nonatomic, retain) UIImage *centerHandleImageHighlighted;
-@property (nonatomic, retain) UIImage *rightHandleImage;
-@property (nonatomic, retain) UIImage *rightHandleImageHighlighted;
-@property (nonatomic, assign) CGFloat handleWidth;
-@property (nonatomic, assign) CGFloat handleShadowWidth;
-@property (nonatomic, retain, readonly) UIImageView *onBackgroundImageView;
-@property (nonatomic, retain, readonly) UILabel *onLabel;
-@property (nonatomic, retain, readonly) UIView *onView;
-@property (nonatomic, retain, readonly) UIImageView *offBackgroundImageView;
-@property (nonatomic, retain, readonly) UILabel *offLabel;
-@property (nonatomic, retain, readonly) UIView *offView;
-@property (nonatomic, assign) UIEdgeInsets trackEdgeInsets;
-@property (nonatomic, assign) SSSwitchLabelStyle switchLabelStyle;
-
-- (void)setOn:(BOOL)on animated:(BOOL)animated;
-- (void)toggle;
-- (void)toggleAnimated:(BOOL)animated;
-
-@end
View
395 SSToolkit/SSSwitch.m
@@ -1,395 +0,0 @@
-//
-// SSSwitch.m
-// SSToolkit
-//
-// Created by Sam Soffes on 11/19/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSSwitch.h"
-#import "UIImage+SSToolkitAdditions.h"
-
-@interface SSSwitch ()
-- (void)_initialize;
-- (void)_layoutSubviewsWithHandlePosition:(CGFloat)x;
-- (void)_handleReleased:(id)sender;
-- (void)_handleDragged:(id)sender event:(UIEvent *)event;
-- (void)_handleDraggingEnded:(id)sender;
-@end
-
-@implementation SSSwitch {
- UIView *_labelMaskView;
- BOOL _dragging;
- CGFloat _dragOffset;
- NSInteger _hitCount;
-}
-
-
-#pragma mark - Accessors
-
-@synthesize on = _on;
-@synthesize style = _style;
-@synthesize handle = _handle;
-@synthesize leftHandleImage = _leftHandleImage;
-@synthesize leftHandleImageHighlighted = _leftHandleImageHighlighted;
-@synthesize centerHandleImage = _centerHandleImage;
-@synthesize centerHandleImageHighlighted = _centerHandleImageHighlighted;
-@synthesize rightHandleImage = _rightHandleImage;
-@synthesize rightHandleImageHighlighted = _rightHandleImageHighlighted;
-@synthesize handleWidth = _handleWidth;
-@synthesize handleShadowWidth = _handleShadowWidth;
-@synthesize onBackgroundImageView = _onBackgroundImageView;
-@synthesize onLabel = _onLabel;
-@synthesize onView = _onView;
-@synthesize offBackgroundImageView = _offBackgroundImageView;
-@synthesize offLabel = _offLabel;
-@synthesize offView = _offView;
-@synthesize trackEdgeInsets = _trackEdgeInsets;
-@synthesize switchLabelStyle = _switchLabelStyle;
-
-- (void)setOn:(BOOL)on {
- [self setOn:on animated:NO];
-}
-
-
-- (void)setStyle:(SSSwitchStyle)s {
- _style = s;
-
- // TODO: Always apply default style before changing style for more consistent results
-
- switch (_style) {
- case SSSwitchStyleDefault: {
- NSInteger leftCap = 8;
-
- self.leftHandleImage = [[UIImage imageNamed:@"UISwitchButtonRightShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.leftHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonRightShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.centerHandleImage = [[UIImage imageNamed:@"UISwitchButtonFullShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.centerHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonFullShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.rightHandleImage = [[UIImage imageNamed:@"UISwitchButtonLeftShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.rightHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonLeftShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
-
- self.handleWidth = 42;
- self.handleShadowWidth = 2;
-
- self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackBlue.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
-
- self.onLabel.textColor = [UIColor whiteColor];
- self.onLabel.font = [UIFont boldSystemFontOfSize:16.0f];
- self.onLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.5f];
- self.onLabel.shadowOffset = CGSizeMake(0.0f, -1.0f);
-
- self.offBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackClear.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
-
- self.offLabel.textColor = [UIColor colorWithWhite:0.475f alpha:1.0f];
- self.offLabel.font = [UIFont boldSystemFontOfSize:16.0f];
- self.offLabel.shadowColor = nil;
-
- self.trackEdgeInsets = UIEdgeInsetsZero;
-
- break;
- }
-
- case SSSwitchStyleAirplane: {
- self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackOrange.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
- break;
- }
- }
-
- [self _layoutSubviewsWithHandlePosition:_on ? 1.0f : 0.0f];
-}
-
-
-- (void)setLeftHandleImage:(UIImage *)leftHandleImage {
- [leftHandleImage retain];
- [_leftHandleImage release];
- _leftHandleImage = leftHandleImage;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setLeftHandleImageHighlighted:(UIImage *)leftHandleImageHighlighted {
- [leftHandleImageHighlighted retain];
- [_leftHandleImageHighlighted release];
- _leftHandleImageHighlighted = leftHandleImageHighlighted;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setCenterHandleImage:(UIImage *)centerHandleImage {
- [centerHandleImage retain];
- [_centerHandleImage release];
- _centerHandleImage = centerHandleImage;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setCenterHandleImageHighlighted:(UIImage *)centerHandleImageHighlighted {
- [centerHandleImageHighlighted retain];
- [_centerHandleImageHighlighted release];
- _centerHandleImageHighlighted = centerHandleImageHighlighted;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setRightHandleImage:(UIImage *)rightHandleImage {
- [rightHandleImage retain];
- [_rightHandleImage release];
- _rightHandleImage = rightHandleImage;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setRightHandleImageHighlighted:(UIImage *)rightHandleImageHighlighted {
- [rightHandleImageHighlighted retain];
- [_rightHandleImageHighlighted release];
- _rightHandleImageHighlighted = rightHandleImageHighlighted;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setHandleWidth:(CGFloat)handleWidth {
- _handleWidth = handleWidth;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setHandleShadowWidth:(CGFloat)handleShadowWidth {
- _handleShadowWidth = handleShadowWidth;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setTrackEdgeInsets:(UIEdgeInsets)trackEdgeInsets {
- _trackEdgeInsets = trackEdgeInsets;
-
- [self setNeedsDisplay];
-}
-
-
-- (void)setSwitchLabelStyle:(SSSwitchLabelStyle)switchLabelStyle {
- _switchLabelStyle = switchLabelStyle;
-
- [self setNeedsDisplay];
-}
-
-
-#pragma mark - NSObject
-
-- (void)dealloc {
- [_leftHandleImage release];
- [_leftHandleImageHighlighted release];
- [_centerHandleImage release];
- [_centerHandleImageHighlighted release];
- [_rightHandleImage release];
- [_rightHandleImageHighlighted release];
- [_handle release];
- [_onBackgroundImageView release];
- [_onLabel release];
- [_onView release];
- [_offBackgroundImageView release];
- [_offLabel release];
- [_offView release];
- [_labelMaskView release];
- [super dealloc];
-}
-
-
-#pragma mark - UIView
-
-- (id)initWithCoder:(NSCoder *)aDecoder {
- if ((self = [super initWithCoder:aDecoder])) {
- [self _initialize];
- }
- return self;
-}
-
-
-- (id)initWithFrame:(CGRect)frame {
- if ((self = [super initWithFrame:frame])) {
- [self _initialize];
- }
- return self;
-}
-
-
-- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
- // Forward all touches to the handle
- return [super hitTest:point withEvent:event] ? _handle : nil;
-}
-
-
-#pragma mark - Switch
-
-- (void)setOn:(BOOL)on animated:(BOOL)animated {
- _on = on;
- // TODO: UIControl stuff
-
- if (animated) {
- [UIView beginAnimations:[NSString stringWithFormat:@"SSSwitchAnimate%@", (_on ? @"On" : @"Off")] context:nil];
- [UIView setAnimationDuration:0.2f];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
- }
-
- [self _layoutSubviewsWithHandlePosition:(_on ? self.frame.size.width - _handleWidth : 0.0f)];
-
- if (animated) {
- [UIView commitAnimations];
- }
-
- [self sendActionsForControlEvents:UIControlEventValueChanged];
-}
-
-
-- (void)toggle {
- [self toggleAnimated:YES];
-}
-
-
-- (void)toggleAnimated:(BOOL)animated {
- [self setOn:!_on animated:animated];
-}
-
-
-#pragma mark - Private
-
-- (void)_initialize {
- self.backgroundColor = [UIColor clearColor];
- self.clipsToBounds = YES;
- self.autoresizesSubviews = NO; // TODO: Possibly remove
-
- // On background
- _onBackgroundImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
- _onBackgroundImageView.autoresizesSubviews = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- _onBackgroundImageView.clipsToBounds = YES;
- [self addSubview:_onBackgroundImageView];
-
- // Off background
- _offBackgroundImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
- _offBackgroundImageView.autoresizesSubviews = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- _offBackgroundImageView.clipsToBounds = YES;
- [self addSubview:_offBackgroundImageView];
-
- // Label mask
- _labelMaskView = [[UIView alloc] initWithFrame:CGRectZero];
- _labelMaskView.backgroundColor = [UIColor clearColor];
- _labelMaskView.autoresizesSubviews = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- _labelMaskView.clipsToBounds = YES;
- [self addSubview:_labelMaskView];
-
- // On label
- _onLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- _onLabel.backgroundColor = [UIColor clearColor];
- _onLabel.text = @"ON";
- _onLabel.textAlignment = UITextAlignmentCenter;
- [_labelMaskView addSubview:_onLabel];
-
- // Off label
- _offLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- _offLabel.backgroundColor = [UIColor clearColor];
- _offLabel.text = @"OFF";
- _offLabel.textAlignment = UITextAlignmentCenter;
- [_labelMaskView addSubview:_offLabel];
-
- // Handle
- _handle = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
- [_handle addTarget:self action:@selector(_handleReleased:) forControlEvents:UIControlEventTouchUpInside];
- [_handle addTarget:self action:@selector(_handleDragged:event:) forControlEvents:UIControlEventTouchDragInside];
- [_handle addTarget:self action:@selector(_handleDraggingEnded:) forControlEvents:UIControlEventTouchUpOutside];
- [self addSubview:_handle];
-
- // Defaults
- _dragging = NO;
- _hitCount = 0;
- _switchLabelStyle = SSSwitchLabelStyleDefault;
- _on = NO;
- self.style = SSSwitchStyleDefault;
-}
-
-
-- (void)_layoutSubviewsWithHandlePosition:(CGFloat)x {
- CGFloat width = self.frame.size.width;
- CGFloat height = self.frame.size.height;
- CGFloat sideWidth = width - _handleWidth;
- CGFloat labelWidth = sideWidth - _trackEdgeInsets.left - _trackEdgeInsets.right;
- CGFloat labelHeight = height - _trackEdgeInsets.top - _trackEdgeInsets.bottom;
- CGFloat labelClipWidth = 3.0f;
- NSUInteger position = 1;
-
- _labelMaskView.frame = UIEdgeInsetsInsetRect(CGRectMake(labelClipWidth, 0.0f, width - labelClipWidth * 2.0f, height), _trackEdgeInsets);
-
- // Enforce limits
- x = fminf(fmaxf(0.0f, x), sideWidth);
-
- // Calculate shadow width
- if (_handleShadowWidth > 0.0f) {
- position = x == 0 ? 0 : (x == sideWidth ? 2 : 1); // 0: left, 1: center, 2: right
-
- if (position == 0) {
- [_handle setBackgroundImage:_leftHandleImage forState:UIControlStateNormal];
- [_handle setBackgroundImage:_leftHandleImageHighlighted forState:UIControlStateHighlighted];
- } else if (position == 1) {
- [_handle setBackgroundImage:_centerHandleImage forState:UIControlStateNormal];
- [_handle setBackgroundImage:_centerHandleImageHighlighted forState:UIControlStateHighlighted];
- } else {
- [_handle setBackgroundImage:_rightHandleImage forState:UIControlStateNormal];
- [_handle setBackgroundImage:_rightHandleImageHighlighted forState:UIControlStateHighlighted];
- }
- } else {
- [_handle setBackgroundImage:_centerHandleImage forState:UIControlStateNormal];
- [_handle setBackgroundImage:_centerHandleImageHighlighted forState:UIControlStateHighlighted];
- }
-
- _handle.frame = UIEdgeInsetsInsetRect(CGRectMake(x - _handleShadowWidth, 0.0f, _handleWidth + _handleShadowWidth + _handleShadowWidth, height), _trackEdgeInsets);
- _onBackgroundImageView.frame = CGRectMake(0.0f, 0.0f, width, height);
-
- CGFloat leftCapWidth = _leftHandleImage.leftCapWidth;
- _offBackgroundImageView.frame = CGRectMake(x + _trackEdgeInsets.left + leftCapWidth, 0.0f, width - x - _trackEdgeInsets.left - leftCapWidth, height);
-
- // TODO: These are still a bit hacky (with the +2 and -1)
- _onLabel.frame = CGRectMake(x - labelWidth - _trackEdgeInsets.left - labelClipWidth + 2.0f, 0.0f, labelWidth, labelHeight);
- _offLabel.frame = CGRectMake(x + _handleWidth - _trackEdgeInsets.right - labelClipWidth - 1.0f, 0.0f, labelWidth, labelHeight);
-}
-
-
-- (void)_handleReleased:(id)sender {
- // Tapped
- if (_dragging == NO) {
- _hitCount++;
- [self toggle];
- return;
- }
-
- // Drag release
- _dragging = NO;
- CGFloat halfHandleSize = (_handleWidth - _handleShadowWidth) / 2.0f;
- BOOL onOrOff = (_handle.frame.origin.x + halfHandleSize) > (self.frame.size.width / 2.0);
- [self setOn:onOrOff animated:YES];
-}
-
-
-- (void)_handleDragged:(id)sender event:(UIEvent *)event {
- UITouch *touch = [[event touchesForView:_handle] anyObject];
-
- if (_dragging == NO) {
- _dragOffset = [touch locationInView:_handle].x;
- }
-
- _dragging = YES;
- [self _layoutSubviewsWithHandlePosition:[touch locationInView:self].x - _dragOffset];
-}
-
-
-- (void)_handleDraggingEnded:(id)sender {
- _dragging = NO;
- [self _handleReleased:sender];
-}
-
-@end
View
45 SSToolkit/SSTableViewController.h
@@ -1,45 +0,0 @@
-//
-// SSTableViewController.h
-// SSToolkit
-//
-// Created by Sam Soffes on 10/14/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSViewController.h"
-
-/**
- The SSTableViewController class creates a controller object that manages a table view.
-
- This class is a SSViewController subclass that is a drop-in replacement for UITableViewController.
- */
-@interface SSTableViewController : SSViewController <UITableViewDataSource, UITableViewDelegate>
-
-/**
- Returns the table view managed by the controller object.
- */
-@property (nonatomic, retain) UITableView *tableView;
-
-/**
- A Boolean value indicating if the controller clears the selection when the table appears.
-
- The default value of this property is YES. When YES, the table view controller clears the table's
- current selection when it receives a viewWillAppear: message. Setting this property to `NO`
- preserves the selection.
- */
-@property (nonatomic) BOOL clearsSelectionOnViewWillAppear;
-
-/**
- Initializes a table-view controller to manage a table view of a given style.
-
- @param style A constant that specifies the style of table view that the controller object
- is to manage (UITableViewStylePlain or UITableViewStyleGrouped).
-
- @return An initialized UITableViewController object or nil if the object couldn’t be created.
-
- If you use the standard init method to initialize a UITableViewController object, a table view
- in the plain style is created.
- */
-- (id)initWithStyle:(UITableViewStyle)style;
-
-@end
View
101 SSToolkit/SSTableViewController.m
@@ -1,101 +0,0 @@
-//
-// SSTableViewController.m
-// SSToolkit
-//
-// Created by Sam Soffes on 10/14/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSTableViewController.h"
-#import "SSDrawingUtilities.h"
-
-@implementation SSTableViewController
-
-#pragma mark - Accessors
-
-@synthesize tableView = _tableView;
-@synthesize clearsSelectionOnViewWillAppear = _clearsSelectionOnViewWillAppear;
-
-
-#pragma mark - NSObject
-
-- (id)init {
- self = [self initWithStyle:UITableViewStylePlain];
- return self;
-}
-
-
-- (void)dealloc {
- _tableView.dataSource = nil;
- _tableView.delegate = nil;
- [_tableView release];
- [super dealloc];
-}
-
-
-#pragma mark - UIViewController
-
-- (void)loadView {
- _tableView.frame = [[UIScreen mainScreen] applicationFrame];
- self.view = _tableView;
-}
-
-
-- (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- // TODO: Only reload if data is empty
- [self.tableView reloadData];
-
- if (_clearsSelectionOnViewWillAppear) {
- [self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
- }
-}
-
-
-- (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [self.tableView flashScrollIndicators];
-}
-
-
-- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
- [super setEditing:editing animated:animated];
- [self.tableView setEditing:editing animated:animated];
-}
-
-
-#pragma mark - SSViewController
-
-- (void)layoutViewsWithOrientation:(UIInterfaceOrientation)orientation {
- [super layoutViewsWithOrientation:orientation];
- self.tableView.frame = self.view.bounds;
-}
-
-
-#pragma mark - Initializer
-
-- (id)initWithStyle:(UITableViewStyle)style {
- if ((self = [super init])) {
- _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:style];
- _tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- _tableView.dataSource = self;
- _tableView.delegate = self;
- _clearsSelectionOnViewWillAppear = YES;
- }
- return self;
-}
-
-
-#pragma mark - UITableViewDataSource
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- return nil;
-}
-
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 0;
-}
-
-@end
View
49 SSToolkit/SSToolkit.h
@@ -9,48 +9,6 @@
// This setting of 1 is best if you copy the source into your project. The build transforms the 1 to a 0 when building
// the framework and static lib. Thanks @stig
-#if 1
-
-// Views
-#import "SSAnimatedImageView.h"
-#import "SSBadgeView.h"
-#import "SSBorderedView.h"
-#import "SSCollectionView.h"
-#import "SSCollectionViewItem.h"
-#import "SSGradientView.h"
-#import "SSHUDView.h"
-#import "SSLabel.h"
-#import "SSLineView.h"
-#import "SSLoadingView.h"
-#import "SSPieProgressView.h"
-#import "SSWebView.h"
-
-// Cells
-#import "SSBadgeTableViewCell.h"
-
-// Controls
-#import "SSAddressBarTextField.h"
-#import "SSTextField.h"
-#import "SSTextView.h"
-#import "SSRatingPicker.h"
-#import "SSSegmentedControl.h"
-#import "SSSwitch.h"
-
-// View Controllers
-#import "SSCollectionViewController.h"
-#import "SSModalViewController.h"
-#import "SSNavigationController.h"
-#import "SSPickerViewController.h"
-#import "SSRatingPickerViewController.h"
-#import "SSTableViewController.h"
-#import "SSViewController.h"
-
-// Misc
-#import "SSDrawingUtilities.h"
-#import "SSConcurrentOperation.h"
-
-#else
-
// Views
#import <SSToolkit/SSAnimatedImageView.h>
#import <SSToolkit/SSBadgeView.h>
@@ -74,19 +32,12 @@
#import <SSToolkit/SSTextView.h>
#import <SSToolkit/SSRatingPicker.h>
#import <SSToolkit/SSSegmentedControl.h>
-#import <SSToolkit/SSSwitch.h>
// View Controllers
#import <SSToolkit/SSCollectionViewController.h>
-#import <SSToolkit/SSModalViewController.h>
-#import <SSToolkit/SSNavigationController.h>
#import <SSToolkit/SSPickerViewController.h>
#import <SSToolkit/SSRatingPickerViewController.h>
-#import <SSToolkit/SSTableViewController.h>
-#import <SSToolkit/SSViewController.h>
// Misc
#import <SSToolkit/SSDrawingUtilities.h>
#import <SSToolkit/SSConcurrentOperation.h>
-
-#endif
View
38 SSToolkit/SSViewController.h
@@ -1,38 +0,0 @@
-//
-// SSViewController.h
-// SSToolkit
-//
-// Created by Sam Soffes on 7/14/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSModalViewController.h"
-
-/**
- UIViewController subclass that displaying custom modals and
- other nice enhancements.
-
- Note: Currently only iPad is supported.
- */
-@interface SSViewController : UIViewController <SSModalViewController>
-
-@property (nonatomic, assign) SSViewController *modalParentViewController;
-@property (nonatomic, retain, readonly) UIViewController<SSModalViewController> *customModalViewController;
-@property (nonatomic, assign) BOOL dismissCustomModalOnVignetteTap;
-@property (nonatomic, assign) CGSize contentSizeForViewInCustomModal;
-@property (nonatomic, assign) CGPoint originOffsetForViewInCustomModal;
-
-- (void)layoutViews;
-- (void)layoutViewsWithOrientation:(UIInterfaceOrientation)orientation;
-
-- (void)presentCustomModalViewController:(UIViewController<SSModalViewController> *)viewController;
-- (void)presentCustomModalViewController:(UIViewController<SSModalViewController> *)viewController animated:(BOOL)animated;
-- (void)dismissCustomModalViewController;
-- (void)dismissCustomModalViewController:(BOOL)animated;
-
-- (void)customModalWillAppear:(BOOL)animated;
-- (void)customModalDidAppear:(BOOL)animated;
-- (void)customModalWillDisappear:(BOOL)animated;
-- (void)customModalDidDisappear:(BOOL)animated;
-
-@end
View
329 SSToolkit/SSViewController.m
@@ -1,329 +0,0 @@
-//
-// SSViewController.m
-// SSToolkit
-//
-// Created by Sam Soffes on 7/14/10.
-// Copyright 2010-2011 Sam Soffes. All rights reserved.
-//
-
-#import "SSViewController.h"
-#import "UIImage+SSToolkitAdditions.h"
-#import "UIView+SSToolkitAdditions.h"
-#import <QuartzCore/QuartzCore.h>
-
-static CGFloat const kSSViewControllerModalPadding = 22.0f;
-static CGSize const kSSViewControllerDefaultContentSizeForViewInCustomModal = {540.0f, 620.0f};
-
-@interface SSViewController (PrivateMethods)
-- (void)_cleanUpModal;
-- (void)_presentModalAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
-- (void)_dismissModalAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
-- (void)_dismissVignetteAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
-@end
-
-
-@implementation SSViewController {
- UIView *_modalContainerView;
- UIImageView *_modalContainerBackgroundView;
- UIButton *_vignetteButton;
-}
-
-#pragma mark - Accessors
-
-@synthesize modalParentViewController = _modalParentViewController;
-@synthesize customModalViewController = _customModalViewController;
-@synthesize dismissCustomModalOnVignetteTap = _dismissCustomModalOnVignetteTap;
-@synthesize contentSizeForViewInCustomModal = _contentSizeForViewInCustomModal;
-@synthesize originOffsetForViewInCustomModal = _originOffsetForViewInCustomModal;
-
-
-#pragma mark - NSObject
-
-- (id)init {
- if ((self = [super init])) {
- _dismissCustomModalOnVignetteTap = NO;
- _contentSizeForViewInCustomModal = kSSViewControllerDefaultContentSizeForViewInCustomModal;
- _originOffsetForViewInCustomModal = CGPointZero;
- }
- return self;
-}
-
-
-- (void)dealloc {
- [self _cleanUpModal];
- [super dealloc];
-}
-
-
-#pragma mark - UIViewController
-
-- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
- [UIView beginAnimations:@"rotate" context:self];
- [UIView setAnimationDuration:duration];
- [self layoutViewsWithOrientation:toInterfaceOrientation];
- [UIView commitAnimations];
-}
-
-
-- (void)viewWillAppear:(BOOL)animated {
- [self layoutViews];
-}
-
-
-#pragma mark - Layout
-
-- (void)layoutViews {
- [self layoutViewsWithOrientation:self.interfaceOrientation];
-}
-
-
-- (void)layoutViewsWithOrientation:(UIInterfaceOrientation)orientation {
- if (!_customModalViewController) {
- return;
- }
-
- CGSize screenSize;
-
- // TODO: Make this not iPad specific
-
- // Landscape
- if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) {
- screenSize = CGSizeMake(1024.0f, 768.0f);
- _vignetteButton.frame = CGRectMake(0.0f, -128.0f, 1024.0f, 1024.0f);
- }
-
- // Portrait
- else {
- screenSize = CGSizeMake(768.0f, 1024.0f);
- _vignetteButton.frame = CGRectMake(-128.0f, 0.0f, 1024.0f, 1024.0f);
- }
-
- CGSize modalSize = kSSViewControllerDefaultContentSizeForViewInCustomModal;
- if ([_customModalViewController respondsToSelector:@selector(contentSizeForViewInCustomModal)]) {
- modalSize = [_customModalViewController contentSizeForViewInCustomModal];
- }
-
- CGPoint originOffset = CGPointZero;
- if ([_customModalViewController respondsToSelector:@selector(originOffsetForViewInCustomModal)]) {
- originOffset = [_customModalViewController originOffsetForViewInCustomModal];
- }
- _modalContainerBackgroundView.frame = CGRectMake((roundf(screenSize.width - modalSize.width - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f) + originOffset.x, (roundf(screenSize.height - modalSize.height - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f) + originOffset.y, modalSize.width + kSSViewControllerModalPadding + kSSViewControllerModalPadding, modalSize.height + kSSViewControllerModalPadding + kSSViewControllerModalPadding);
-}
-
-
-#pragma mark - Modal
-
-- (void)presentCustomModalViewController:(UIViewController<SSModalViewController> *)viewController {
- [self presentCustomModalViewController:viewController animated:YES];
-}
-
-
-- (void)presentCustomModalViewController:(UIViewController<SSModalViewController> *)viewController animated:(BOOL)animated {
- _customModalViewController = [viewController retain];
-
- if (_customModalViewController == nil) {
- return;
- }
-
- _customModalViewController.modalParentViewController = self;
-
- CGSize modalSize = kSSViewControllerDefaultContentSizeForViewInCustomModal;
- if ([_customModalViewController respondsToSelector:@selector(contentSizeForViewInCustomModal)]) {
- modalSize = [_customModalViewController contentSizeForViewInCustomModal];
- }
-
- if (_vignetteButton == nil) {
- _vignetteButton = [[UIButton alloc] initWithFrame:CGRectZero];
- [_vignetteButton setImage:[UIImage imageNamed:@"SSVignetteiPad.png" bundleName:kSSToolkitBundleName] forState:UIControlStateNormal];
- _vignetteButton.adjustsImageWhenHighlighted = NO;
- _vignetteButton.alpha = 0.0f;
- }
-
- [self.view addSubview:_vignetteButton];
- [_vignetteButton fadeIn];
-
- if (_modalContainerBackgroundView == nil) {
- UIImage *modalBackgroundImage = [[UIImage imageNamed:@"SSViewControllerFormBackground.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:43 topCapHeight:45];
- _modalContainerBackgroundView = [[UIImageView alloc] initWithImage:modalBackgroundImage];
- _modalContainerBackgroundView.autoresizesSubviews = NO;
- _modalContainerBackgroundView.userInteractionEnabled = YES;
- }
-
- [self.view addSubview:_modalContainerBackgroundView];
-
- if (_modalContainerView == nil) {
- _modalContainerView = [[UIView alloc] initWithFrame:CGRectMake(kSSViewControllerModalPadding, kSSViewControllerModalPadding, modalSize.width, modalSize.height)];
- _modalContainerView.layer.cornerRadius = 5.0f;
- _modalContainerView.clipsToBounds = YES;
- [_modalContainerBackgroundView addSubview:_modalContainerView];
- }
-
- UIView *modalView = _customModalViewController.view;
- [_modalContainerView addSubview:modalView];
- modalView.frame = CGRectMake(0.0f, 0.0f, modalSize.width, modalSize.height);
-
- CGSize screenSize;
- if (self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
- screenSize = CGSizeMake(1024.0f, 768.0f);
- } else {
- screenSize = CGSizeMake(768.0f, 1024.0f);
- }
-
- CGPoint originOffset = CGPointZero;
- if ([_customModalViewController respondsToSelector:@selector(originOffsetForViewInCustomModal)]) {
- originOffset = [_customModalViewController originOffsetForViewInCustomModal];
- }
-
- _modalContainerBackgroundView.frame = CGRectMake((roundf(screenSize.width - modalSize.width - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f) + originOffset.x, (roundf(screenSize.height - modalSize.height - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f) + originOffset.y + screenSize.height, modalSize.width + kSSViewControllerModalPadding + kSSViewControllerModalPadding, modalSize.height + kSSViewControllerModalPadding + kSSViewControllerModalPadding);
-
-
- if ([_customModalViewController respondsToSelector:@selector(viewWillAppear:)]) {
- [_customModalViewController viewWillAppear:animated];
- }
-
- [self customModalWillAppear:animated];
-
- if (animated) {
- [UIView beginAnimations:@"com.samsoffes.sstoolkit.ssviewcontroller.present-modal" context:self];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- [UIView setAnimationDuration:0.5];
- [UIView setAnimationDelegate:self];
- [UIView setAnimationDidStopSelector:@selector(_presentModalAnimationDidStop:finished:context:)];
- }
-
- [self layoutViews];
-
- if (animated) {
- [UIView commitAnimations];
- } else {
- [self _presentModalAnimationDidStop:nil finished:nil context:nil];
- }
-}
-
-
-- (void)dismissCustomModalViewController {
- [self dismissCustomModalViewController:YES];
-}
-
-
-- (void)dismissCustomModalViewController:(BOOL)animated {
- CGSize screenSize;
- if (self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
- screenSize = CGSizeMake(1024.0f, 768.0f);
- } else {
- screenSize = CGSizeMake(768.0f, 1024.0f);
- }
-
- CGSize modalSize = kSSViewControllerDefaultContentSizeForViewInCustomModal;
- if ([_customModalViewController respondsToSelector:@selector(contentSizeForViewInCustomModal)]) {
- modalSize = [_customModalViewController contentSizeForViewInCustomModal];
- }
-
- if ([_customModalViewController respondsToSelector:@selector(viewWillDisappear:)]) {
- [_customModalViewController viewWillDisappear:animated];
- }
-
- [self customModalWillDisappear:animated];
-
- if (animated) {
- [UIView beginAnimations:@"com.samsoffes.sstoolkit.ssviewcontroller.dismiss-modal" context:self];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- [UIView setAnimationDuration:0.4];
- [UIView setAnimationDelegate:self];
- [UIView setAnimationDidStopSelector:@selector(_dismissModalAnimationDidStop:finished:context:)];
- } else {
- [self _dismissModalAnimationDidStop:nil finished:nil context:nil];
- }
-
- _modalContainerBackgroundView.frame = CGRectMake(roundf(screenSize.width - modalSize.width - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f, (roundf(screenSize.height - modalSize.height - kSSViewControllerModalPadding - kSSViewControllerModalPadding) / 2.0f) + screenSize.height, modalSize.width + kSSViewControllerModalPadding + kSSViewControllerModalPadding, modalSize.height + kSSViewControllerModalPadding + kSSViewControllerModalPadding);
-
- if (animated) {
- [UIView commitAnimations];
-
- [UIView beginAnimations:@"com.samsoffes.sstoolkit.ssviewcontroller.remove-vignette" context:self];
- [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- [UIView setAnimationDelay:0.2];
- [UIView setAnimationDelegate:self];
- [UIView setAnimationDidStopSelector:@selector(_dismissVignetteAnimationDidStop:finished:context:)];
- }
-
- _vignetteButton.alpha = 0.0f;
-
- if (animated) {
- [UIView commitAnimations];
- } else {
- [self _dismissVignetteAnimationDidStop:nil finished:nil context:nil];
- }
-}
-
-
-- (void)customModalWillAppear:(BOOL)animated {
- // Can be overridden by a subclass
-}
-
-
-- (void)customModalDidAppear:(BOOL)animated {
- // Can be overridden by a subclass
-}
-
-
-- (void)customModalWillDisappear:(BOOL)animated {
- // Can be overridden by a subclass
-}
-
-
-- (void)customModalDidDisappear:(BOOL)animated {
- // Can be overridden by a subclass
-}
-
-
-#pragma mark - Private Methods
-
-- (void)_cleanUpModal {
- [_modalContainerBackgroundView removeFromSuperview];
- [_modalContainerBackgroundView release];
- _modalContainerBackgroundView = nil;
-
- [_vignetteButton removeFromSuperview];
- [_vignetteButton release];
- _vignetteButton = nil;
-
- [_customModalViewController release];
- _customModalViewController = nil;
-
- [_modalContainerView release];
- _modalContainerView = nil;
-}
-
-
-- (void)_presentModalAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
- BOOL animated = (animationID != nil);
-
- if ([_customModalViewController respondsToSelector:@selector(viewDidAppear:)]) {
- [_customModalViewController viewDidAppear:animated];
- }
-
- [self customModalDidAppear:animated];
-
- if ([_customModalViewController respondsToSelector:@selector(dismissCustomModalOnVignetteTap)] && [_customModalViewController dismissCustomModalOnVignetteTap] == YES) {
- [_vignetteButton addTarget:self action:@selector(dismissCustomModalViewController) forControlEvents:UIControlEventTouchUpInside];
- }
-}
-
-
-- (void)_dismissModalAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
- BOOL animated = (animationID != nil);
-
- if ([_customModalViewController respondsToSelector:@selector(viewDidDisappear:)]) {
- [_customModalViewController viewDidDisappear:animated];
- }
-
- [self customModalDidDisappear:animated];
-}
-
-
-- (void)_dismissVignetteAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
- [self _cleanUpModal];
-}
-
-@end
Please sign in to comment.
Something went wrong with that request. Please try again.