Skip to content
Browse files

first commit

  • Loading branch information...
0 parents commit 392c29f0de3f987da166b603bc483f89314e459d @funkyboy committed Feb 23, 2012
Showing with 1,228 additions and 0 deletions.
  1. BIN .DS_Store
  2. +6 −0 README
  3. +347 −0 RotaryWheelProject.xcodeproj/project.pbxproj
  4. +7 −0 RotaryWheelProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  5. BIN ....xcodeproj/project.xcworkspace/xcuserdata/cesarerocchi.xcuserdatad/UserInterfaceState.xcuserstate
  6. +5 −0 RotaryWheelProject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  7. +84 −0 ...yWheelProject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcschemes/RotaryWheelProject.xcscheme
  8. +22 −0 RotaryWheelProject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcschemes/xcschememanagement.plist
  9. +40 −0 RotaryWheelProject/RotaryWheelProject-Info.plist
  10. +14 −0 RotaryWheelProject/RotaryWheelProject-Prefix.pch
  11. +18 −0 RotaryWheelProject/SMAppDelegate.h
  12. +66 −0 RotaryWheelProject/SMAppDelegate.m
  13. +17 −0 RotaryWheelProject/SMClove.h
  14. +20 −0 RotaryWheelProject/SMClove.m
  15. +14 −0 RotaryWheelProject/SMRotaryProtocol.h
  16. +32 −0 RotaryWheelProject/SMRotaryWheel.h
  17. +341 −0 RotaryWheelProject/SMRotaryWheel.m
  18. +16 −0 RotaryWheelProject/SMViewController.h
  19. +40 −0 RotaryWheelProject/SMViewController.m
  20. BIN RotaryWheelProject/bg.png
  21. BIN RotaryWheelProject/centerButton.png
  22. +2 −0 RotaryWheelProject/en.lproj/InfoPlist.strings
  23. +119 −0 RotaryWheelProject/en.lproj/SMViewController.xib
  24. BIN RotaryWheelProject/icon0.png
  25. BIN RotaryWheelProject/icon1.png
  26. BIN RotaryWheelProject/icon2.png
  27. BIN RotaryWheelProject/icon3.png
  28. BIN RotaryWheelProject/icon4.png
  29. BIN RotaryWheelProject/icon5.png
  30. BIN RotaryWheelProject/icon6.png
  31. BIN RotaryWheelProject/icon7.png
  32. +18 −0 RotaryWheelProject/main.m
  33. BIN RotaryWheelProject/segment.png
BIN .DS_Store
Binary file not shown.
6 README
@@ -0,0 +1,6 @@
+In case you want to use this code in your projects, you can.
+Just check out the license.txt file for attribution.
+
+This project extends a UIView.
+A version extending UIComponent is available at:
+https://github.com/funkyboy/How-To-Create-a-Rotating-Wheel-Control-with-UIKit
347 RotaryWheelProject.xcodeproj/project.pbxproj
@@ -0,0 +1,347 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ BDF4385314E55A0D00A27135 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BDF4385214E55A0D00A27135 /* UIKit.framework */; };
+ BDF4385514E55A0D00A27135 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BDF4385414E55A0D00A27135 /* Foundation.framework */; };
+ BDF4385714E55A0D00A27135 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BDF4385614E55A0D00A27135 /* CoreGraphics.framework */; };
+ BDF4385D14E55A0D00A27135 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BDF4385B14E55A0D00A27135 /* InfoPlist.strings */; };
+ BDF4385F14E55A0D00A27135 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF4385E14E55A0D00A27135 /* main.m */; };
+ BDF4386314E55A0D00A27135 /* SMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF4386214E55A0D00A27135 /* SMAppDelegate.m */; };
+ BDF4386614E55A0D00A27135 /* SMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF4386514E55A0D00A27135 /* SMViewController.m */; };
+ BDF4386914E55A0D00A27135 /* SMViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BDF4386714E55A0D00A27135 /* SMViewController.xib */; };
+ BDF4387814E55BC000A27135 /* SMClove.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF4387414E55BC000A27135 /* SMClove.m */; };
+ BDF4387914E55BC000A27135 /* SMRotaryWheel.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF4387714E55BC000A27135 /* SMRotaryWheel.m */; };
+ BDF4388614E55C3400A27135 /* bg.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4387B14E55C3400A27135 /* bg.png */; };
+ BDF4388714E55C3400A27135 /* centerButton.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4387C14E55C3400A27135 /* centerButton.png */; };
+ BDF4388814E55C3400A27135 /* icon0.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4387D14E55C3400A27135 /* icon0.png */; };
+ BDF4388914E55C3400A27135 /* icon1.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4387E14E55C3400A27135 /* icon1.png */; };
+ BDF4388A14E55C3400A27135 /* icon2.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4387F14E55C3400A27135 /* icon2.png */; };
+ BDF4388B14E55C3400A27135 /* icon3.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388014E55C3400A27135 /* icon3.png */; };
+ BDF4388C14E55C3400A27135 /* icon4.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388114E55C3400A27135 /* icon4.png */; };
+ BDF4388D14E55C3400A27135 /* icon5.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388214E55C3400A27135 /* icon5.png */; };
+ BDF4388E14E55C3400A27135 /* icon6.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388314E55C3400A27135 /* icon6.png */; };
+ BDF4388F14E55C3400A27135 /* icon7.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388414E55C3400A27135 /* icon7.png */; };
+ BDF4389014E55C3400A27135 /* segment.png in Resources */ = {isa = PBXBuildFile; fileRef = BDF4388514E55C3400A27135 /* segment.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ BDF4384E14E55A0D00A27135 /* RotaryWheelProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RotaryWheelProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ BDF4385214E55A0D00A27135 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ BDF4385414E55A0D00A27135 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ BDF4385614E55A0D00A27135 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ BDF4385A14E55A0D00A27135 /* RotaryWheelProject-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RotaryWheelProject-Info.plist"; sourceTree = "<group>"; };
+ BDF4385C14E55A0D00A27135 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ BDF4385E14E55A0D00A27135 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ BDF4386014E55A0D00A27135 /* RotaryWheelProject-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RotaryWheelProject-Prefix.pch"; sourceTree = "<group>"; };
+ BDF4386114E55A0D00A27135 /* SMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SMAppDelegate.h; sourceTree = "<group>"; };
+ BDF4386214E55A0D00A27135 /* SMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SMAppDelegate.m; sourceTree = "<group>"; };
+ BDF4386414E55A0D00A27135 /* SMViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SMViewController.h; sourceTree = "<group>"; };
+ BDF4386514E55A0D00A27135 /* SMViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SMViewController.m; sourceTree = "<group>"; };
+ BDF4386814E55A0D00A27135 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SMViewController.xib; sourceTree = "<group>"; };
+ BDF4387314E55BC000A27135 /* SMClove.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMClove.h; sourceTree = "<group>"; };
+ BDF4387414E55BC000A27135 /* SMClove.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMClove.m; sourceTree = "<group>"; };
+ BDF4387514E55BC000A27135 /* SMRotaryProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMRotaryProtocol.h; sourceTree = "<group>"; };
+ BDF4387614E55BC000A27135 /* SMRotaryWheel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMRotaryWheel.h; sourceTree = "<group>"; };
+ BDF4387714E55BC000A27135 /* SMRotaryWheel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMRotaryWheel.m; sourceTree = "<group>"; };
+ BDF4387B14E55C3400A27135 /* bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bg.png; sourceTree = "<group>"; };
+ BDF4387C14E55C3400A27135 /* centerButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = centerButton.png; sourceTree = "<group>"; };
+ BDF4387D14E55C3400A27135 /* icon0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon0.png; sourceTree = "<group>"; };
+ BDF4387E14E55C3400A27135 /* icon1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon1.png; sourceTree = "<group>"; };
+ BDF4387F14E55C3400A27135 /* icon2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon2.png; sourceTree = "<group>"; };
+ BDF4388014E55C3400A27135 /* icon3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon3.png; sourceTree = "<group>"; };
+ BDF4388114E55C3400A27135 /* icon4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon4.png; sourceTree = "<group>"; };
+ BDF4388214E55C3400A27135 /* icon5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon5.png; sourceTree = "<group>"; };
+ BDF4388314E55C3400A27135 /* icon6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon6.png; sourceTree = "<group>"; };
+ BDF4388414E55C3400A27135 /* icon7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon7.png; sourceTree = "<group>"; };
+ BDF4388514E55C3400A27135 /* segment.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = segment.png; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ BDF4384B14E55A0D00A27135 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BDF4385314E55A0D00A27135 /* UIKit.framework in Frameworks */,
+ BDF4385514E55A0D00A27135 /* Foundation.framework in Frameworks */,
+ BDF4385714E55A0D00A27135 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ BDF4384314E55A0D00A27135 = {
+ isa = PBXGroup;
+ children = (
+ BDF4385814E55A0D00A27135 /* RotaryWheelProject */,
+ BDF4385114E55A0D00A27135 /* Frameworks */,
+ BDF4384F14E55A0D00A27135 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ BDF4384F14E55A0D00A27135 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ BDF4384E14E55A0D00A27135 /* RotaryWheelProject.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ BDF4385114E55A0D00A27135 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BDF4385214E55A0D00A27135 /* UIKit.framework */,
+ BDF4385414E55A0D00A27135 /* Foundation.framework */,
+ BDF4385614E55A0D00A27135 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ BDF4385814E55A0D00A27135 /* RotaryWheelProject */ = {
+ isa = PBXGroup;
+ children = (
+ BDF4387A14E55C2700A27135 /* assets */,
+ BDF4387314E55BC000A27135 /* SMClove.h */,
+ BDF4387414E55BC000A27135 /* SMClove.m */,
+ BDF4387514E55BC000A27135 /* SMRotaryProtocol.h */,
+ BDF4387614E55BC000A27135 /* SMRotaryWheel.h */,
+ BDF4387714E55BC000A27135 /* SMRotaryWheel.m */,
+ BDF4386114E55A0D00A27135 /* SMAppDelegate.h */,
+ BDF4386214E55A0D00A27135 /* SMAppDelegate.m */,
+ BDF4386414E55A0D00A27135 /* SMViewController.h */,
+ BDF4386514E55A0D00A27135 /* SMViewController.m */,
+ BDF4386714E55A0D00A27135 /* SMViewController.xib */,
+ BDF4385914E55A0D00A27135 /* Supporting Files */,
+ );
+ path = RotaryWheelProject;
+ sourceTree = "<group>";
+ };
+ BDF4385914E55A0D00A27135 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ BDF4385A14E55A0D00A27135 /* RotaryWheelProject-Info.plist */,
+ BDF4385B14E55A0D00A27135 /* InfoPlist.strings */,
+ BDF4385E14E55A0D00A27135 /* main.m */,
+ BDF4386014E55A0D00A27135 /* RotaryWheelProject-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ BDF4387A14E55C2700A27135 /* assets */ = {
+ isa = PBXGroup;
+ children = (
+ BDF4387B14E55C3400A27135 /* bg.png */,
+ BDF4387C14E55C3400A27135 /* centerButton.png */,
+ BDF4387D14E55C3400A27135 /* icon0.png */,
+ BDF4387E14E55C3400A27135 /* icon1.png */,
+ BDF4387F14E55C3400A27135 /* icon2.png */,
+ BDF4388014E55C3400A27135 /* icon3.png */,
+ BDF4388114E55C3400A27135 /* icon4.png */,
+ BDF4388214E55C3400A27135 /* icon5.png */,
+ BDF4388314E55C3400A27135 /* icon6.png */,
+ BDF4388414E55C3400A27135 /* icon7.png */,
+ BDF4388514E55C3400A27135 /* segment.png */,
+ );
+ name = assets;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ BDF4384D14E55A0D00A27135 /* RotaryWheelProject */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BDF4386C14E55A0D00A27135 /* Build configuration list for PBXNativeTarget "RotaryWheelProject" */;
+ buildPhases = (
+ BDF4384A14E55A0D00A27135 /* Sources */,
+ BDF4384B14E55A0D00A27135 /* Frameworks */,
+ BDF4384C14E55A0D00A27135 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = RotaryWheelProject;
+ productName = RotaryWheelProject;
+ productReference = BDF4384E14E55A0D00A27135 /* RotaryWheelProject.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ BDF4384514E55A0D00A27135 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = BDF4384814E55A0D00A27135 /* Build configuration list for PBXProject "RotaryWheelProject" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = BDF4384314E55A0D00A27135;
+ productRefGroup = BDF4384F14E55A0D00A27135 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ BDF4384D14E55A0D00A27135 /* RotaryWheelProject */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ BDF4384C14E55A0D00A27135 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BDF4385D14E55A0D00A27135 /* InfoPlist.strings in Resources */,
+ BDF4386914E55A0D00A27135 /* SMViewController.xib in Resources */,
+ BDF4388614E55C3400A27135 /* bg.png in Resources */,
+ BDF4388714E55C3400A27135 /* centerButton.png in Resources */,
+ BDF4388814E55C3400A27135 /* icon0.png in Resources */,
+ BDF4388914E55C3400A27135 /* icon1.png in Resources */,
+ BDF4388A14E55C3400A27135 /* icon2.png in Resources */,
+ BDF4388B14E55C3400A27135 /* icon3.png in Resources */,
+ BDF4388C14E55C3400A27135 /* icon4.png in Resources */,
+ BDF4388D14E55C3400A27135 /* icon5.png in Resources */,
+ BDF4388E14E55C3400A27135 /* icon6.png in Resources */,
+ BDF4388F14E55C3400A27135 /* icon7.png in Resources */,
+ BDF4389014E55C3400A27135 /* segment.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ BDF4384A14E55A0D00A27135 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BDF4385F14E55A0D00A27135 /* main.m in Sources */,
+ BDF4386314E55A0D00A27135 /* SMAppDelegate.m in Sources */,
+ BDF4386614E55A0D00A27135 /* SMViewController.m in Sources */,
+ BDF4387814E55BC000A27135 /* SMClove.m in Sources */,
+ BDF4387914E55BC000A27135 /* SMRotaryWheel.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ BDF4385B14E55A0D00A27135 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ BDF4385C14E55A0D00A27135 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ BDF4386714E55A0D00A27135 /* SMViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ BDF4386814E55A0D00A27135 /* en */,
+ );
+ name = SMViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ BDF4386A14E55A0D00A27135 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ BDF4386B14E55A0D00A27135 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ BDF4386D14E55A0D00A27135 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "RotaryWheelProject/RotaryWheelProject-Prefix.pch";
+ INFOPLIST_FILE = "RotaryWheelProject/RotaryWheelProject-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ BDF4386E14E55A0D00A27135 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "RotaryWheelProject/RotaryWheelProject-Prefix.pch";
+ INFOPLIST_FILE = "RotaryWheelProject/RotaryWheelProject-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ BDF4384814E55A0D00A27135 /* Build configuration list for PBXProject "RotaryWheelProject" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BDF4386A14E55A0D00A27135 /* Debug */,
+ BDF4386B14E55A0D00A27135 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BDF4386C14E55A0D00A27135 /* Build configuration list for PBXNativeTarget "RotaryWheelProject" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BDF4386D14E55A0D00A27135 /* Debug */,
+ BDF4386E14E55A0D00A27135 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = BDF4384514E55A0D00A27135 /* Project object */;
+}
7 RotaryWheelProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:RotaryWheelProject.xcodeproj">
+ </FileRef>
+</Workspace>
BIN ...oj/project.xcworkspace/xcuserdata/cesarerocchi.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
5 ...elProject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+</Bucket>
84 ...oject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcschemes/RotaryWheelProject.xcscheme
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "BDF4384D14E55A0D00A27135"
+ BuildableName = "RotaryWheelProject.app"
+ BlueprintName = "RotaryWheelProject"
+ ReferencedContainer = "container:RotaryWheelProject.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "BDF4384D14E55A0D00A27135"
+ BuildableName = "RotaryWheelProject.app"
+ BlueprintName = "RotaryWheelProject"
+ ReferencedContainer = "container:RotaryWheelProject.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "BDF4384D14E55A0D00A27135"
+ BuildableName = "RotaryWheelProject.app"
+ BlueprintName = "RotaryWheelProject"
+ ReferencedContainer = "container:RotaryWheelProject.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "BDF4384D14E55A0D00A27135"
+ BuildableName = "RotaryWheelProject.app"
+ BlueprintName = "RotaryWheelProject"
+ ReferencedContainer = "container:RotaryWheelProject.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
22 ...lProject.xcodeproj/xcuserdata/cesarerocchi.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>RotaryWheelProject.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>BDF4384D14E55A0D00A27135</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
40 RotaryWheelProject/RotaryWheelProject-Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>com.studiomagnolia.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
14 RotaryWheelProject/RotaryWheelProject-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'RotaryWheelProject' target in the 'RotaryWheelProject' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
18 RotaryWheelProject/SMAppDelegate.h
@@ -0,0 +1,18 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import <UIKit/UIKit.h>
+
+@class SMViewController;
+
+@interface SMAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) SMViewController *viewController;
+
+@end
66 RotaryWheelProject/SMAppDelegate.m
@@ -0,0 +1,66 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import "SMAppDelegate.h"
+
+#import "SMViewController.h"
+
+@implementation SMAppDelegate
+
+@synthesize window = _window;
+@synthesize viewController = _viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ self.viewController = [[SMViewController alloc] initWithNibName:@"SMViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+@end
17 RotaryWheelProject/SMClove.h
@@ -0,0 +1,17 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import <Foundation/Foundation.h>
+
+@interface SMClove : NSObject
+
+@property float minValue;
+@property float maxValue;
+@property float midValue;
+@property int value;
+
+@end
20 RotaryWheelProject/SMClove.m
@@ -0,0 +1,20 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import "SMClove.h"
+
+@implementation SMClove
+
+@synthesize minValue, maxValue, midValue, value;
+
+- (NSString *) description {
+
+ return [NSString stringWithFormat:@"%i | %f, %f, %f", self.value, self.minValue, self.midValue, self.maxValue];
+
+}
+
+@end
14 RotaryWheelProject/SMRotaryProtocol.h
@@ -0,0 +1,14 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import <Foundation/Foundation.h>
+
+@protocol SMRotaryProtocol <NSObject>
+
+- (void) didChangeValue:(NSString *)newValue;
+
+@end
32 RotaryWheelProject/SMRotaryWheel.h
@@ -0,0 +1,32 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import <UIKit/UIKit.h>
+#import "SMRotaryProtocol.h"
+#import "SMClove.h"
+
+@interface SMRotaryWheel : UIView
+
+@property (weak) id <SMRotaryProtocol> delegate;
+@property (nonatomic, strong) UIView *container;
+@property (nonatomic, strong) NSMutableArray *cloves;
+@property CGAffineTransform startTransform;
+@property int currentValue;
+@property int numberOfSections;
+@property CGPoint wheelCenter;
+@property (nonatomic, strong) NSMutableDictionary *cloveNames;
+
+- (id) initWithFrame:(CGRect)frame andDelegate:(id)del withSections:(int)sectionsNumber;
+- (void) initWheel;
+- (void) buildClovesEven;
+- (void) buildClovesOdd;
+- (float) calculateDistanceFromCenter:(CGPoint)point;
+- (UILabel *) getLabelByValue:(int)value;
+- (NSString *) getCloveName:(int)position;
+
+
+@end
341 RotaryWheelProject/SMRotaryWheel.m
@@ -0,0 +1,341 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import "SMRotaryWheel.h"
+#import <QuartzCore/QuartzCore.h>
+
+#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))
+#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
+
+
+static float deltaAngle;
+static float minAlphavalue = 0.6;
+static float maxAlphavalue = 1.0;
+
+
+@implementation SMRotaryWheel
+
+@synthesize startTransform, container, cloves, currentValue, delegate, wheelCenter, cloveNames, numberOfSections;
+
+
+- (id) initWithFrame:(CGRect)frame andDelegate:(id)del withSections:(int)sectionsNumber {
+
+ if ((self = [super initWithFrame:frame])) {
+
+ self.numberOfSections = sectionsNumber;
+ self.delegate = del;
+ [self initWheel];
+
+ }
+ return self;
+}
+
+
+- (void) initWheel {
+
+ container = [[UIView alloc] initWithFrame:self.frame];
+
+ cloves = [NSMutableArray arrayWithCapacity:numberOfSections];
+
+ // Calculate angle between each clove
+ CGFloat angleSize = 2*M_PI/numberOfSections;
+
+ for (int i = 0; i < numberOfSections; i++) {
+
+ UIImageView *im = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"segment.png"]];
+
+ im.layer.anchorPoint = CGPointMake(1.0f, 0.5f);
+ im.layer.position = CGPointMake(container.bounds.size.width/2.0-container.frame.origin.x,
+ container.bounds.size.height/2.0-container.frame.origin.y);
+ im.transform = CGAffineTransformMakeRotation(angleSize*i);
+ im.alpha = minAlphavalue;
+ im.tag = i;
+
+ if (i == 0) {
+ im.alpha = maxAlphavalue;
+ }
+
+ UIImageView *cloveImage = [[UIImageView alloc] initWithFrame:CGRectMake(12, 15, 40, 40)];
+ cloveImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"icon%i.png", i]];
+ [im addSubview:cloveImage];
+
+ [container addSubview:im];
+
+ }
+
+ container.userInteractionEnabled = NO;
+ [self addSubview:container];
+
+ UIImageView *bg = [[UIImageView alloc] initWithFrame:self.frame];
+ bg.image = [UIImage imageNamed:@"bg.png"];
+ [self addSubview:bg];
+
+ UIImageView *mask = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 58, 58)];
+ mask.image =[UIImage imageNamed:@"centerButton.png"] ;
+ mask.center = self.center;
+ mask.center = CGPointMake(mask.center.x, mask.center.y+3);
+ [self addSubview:mask];
+
+ if (numberOfSections % 2 == 0) {
+
+ [self buildClovesEven];
+
+ } else {
+
+ [self buildClovesOdd];
+
+ }
+
+ [self.delegate didChangeValue:[self getCloveName:0]];
+
+}
+
+
+
+- (UILabel *) getLabelByValue:(int)value {
+
+ UILabel *res;
+
+ NSArray *labels = [container subviews];
+
+ for (UILabel *lab in labels) {
+
+ if (lab.tag == value)
+ res = lab;
+
+ }
+
+ return res;
+
+}
+
+- (void) buildClovesEven {
+
+ CGFloat fanWidth = M_PI*2/numberOfSections;
+ CGFloat mid = 0;
+
+ for (int i = 0; i < numberOfSections; i++) {
+
+ SMClove *clove = [[SMClove alloc] init];
+ clove.midValue = mid;
+ clove.minValue = mid - (fanWidth/2);
+ clove.maxValue = mid + (fanWidth/2);
+ clove.value = i;
+
+
+ if (clove.maxValue-fanWidth < - M_PI) {
+
+ mid = 3.14;
+ clove.midValue = mid;
+ clove.minValue = fabsf(clove.maxValue);
+
+ }
+
+ mid -= fanWidth;
+
+
+ NSLog(@"cl is %@", clove);
+
+ [cloves addObject:clove];
+
+ }
+
+}
+
+
+
+
+- (float) calculateDistanceFromCenter:(CGPoint)point {
+
+ CGPoint center = CGPointMake(self.bounds.size.width/2.0f, self.bounds.size.height/2.0f);
+ float dx = point.x - center.x;
+ float dy = point.y - center.y;
+ return sqrt(dx*dx + dy*dy);
+
+}
+
+-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+
+ UITouch *touch = [touches anyObject];
+ CGPoint delta = [touch locationInView:self];
+ float dist = [self calculateDistanceFromCenter:delta];
+
+ if (dist < 40 || dist > 100)
+ {
+ // forcing a tap to be on the ferrule
+ NSLog(@"ignoring tap (%f,%f)", delta.x, delta.y);
+ return;
+ }
+
+ startTransform = container.transform;
+
+ UILabel *lab = [self getLabelByValue:currentValue];
+ lab.alpha = minAlphavalue;
+
+ float dx = delta.x - container.center.x;
+ float dy = delta.y - container.center.y;
+ deltaAngle = atan2(dy,dx);
+
+}
+
+
+
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ UITouch *touch = [touches anyObject];
+
+ CGPoint pt = [touch locationInView:self];
+
+ float dx = pt.x - container.center.x;
+ float dy = pt.y - container.center.y;
+ float ang = atan2(dy,dx);
+
+ float angleDif = deltaAngle - ang;
+
+ CGAffineTransform newTrans = CGAffineTransformRotate(startTransform, -angleDif);
+ container.transform = newTrans;
+
+ //[self sendActionsForControlEvents:UIControlEventValueChanged];
+}
+
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+
+ CGFloat radians = atan2f(container.transform.b, container.transform.a);
+ NSLog(@"rad is %f", radians);
+
+ CGFloat newVal = 0.0;
+
+ for (SMClove *c in cloves) {
+
+ if (c.minValue > 0 && c.maxValue < 0) {
+
+ if (c.maxValue > radians || c.minValue < radians) {
+
+ if (radians > 0) {
+
+ newVal = radians - M_PI;
+
+ } else {
+
+ newVal = M_PI + radians;
+
+ }
+ currentValue = c.value;
+
+ }
+
+ }
+
+ if (radians > c.minValue && radians < c.maxValue) {
+
+ newVal = radians - c.midValue;
+ currentValue = c.value;
+
+ }
+
+ }
+
+ [UIView beginAnimations:nil context:NULL];
+ [UIView setAnimationDuration:0.2];
+
+ CGAffineTransform t = CGAffineTransformRotate(container.transform, -newVal);
+ container.transform = t;
+
+ [UIView commitAnimations];
+
+ UILabel *lab = [self getLabelByValue:currentValue];
+ lab.alpha = maxAlphavalue;
+
+ [self.delegate didChangeValue:[self getCloveName:currentValue]];
+
+}
+
+
+
+- (NSString *) getCloveName:(int)position {
+
+ NSString *res = @"";
+
+ switch (position) {
+ case 0:
+ res = @"Circles";
+ break;
+
+ case 1:
+ res = @"Flower";
+ break;
+
+ case 2:
+ res = @"Monster";
+ break;
+
+ case 3:
+ res = @"Person";
+ break;
+
+ case 4:
+ res = @"Smile";
+ break;
+
+ case 5:
+ res = @"Sun";
+ break;
+
+ case 6:
+ res = @"Swirl";
+ break;
+
+ case 7:
+ res = @"3 circles";
+ break;
+
+ case 8:
+ res = @"Triangle";
+ break;
+
+ default:
+ break;
+ }
+
+ return res;
+}
+
+- (void) buildClovesOdd {
+
+ CGFloat fanWidth = M_PI*2/numberOfSections;
+ CGFloat mid = 0;
+
+ for (int i = 0; i < numberOfSections; i++) {
+
+ SMClove *clove = [[SMClove alloc] init];
+ clove.midValue = mid;
+ clove.minValue = mid - (fanWidth/2);
+ clove.maxValue = mid + (fanWidth/2);
+ clove.value = i;
+
+ mid -= fanWidth;
+
+ if (clove.minValue < - M_PI) { // odd sections
+
+ mid = -mid;
+ mid -= fanWidth;
+
+ }
+
+
+ NSLog(@"cl is %@", clove);
+
+ [cloves addObject:clove];
+
+ }
+
+
+}
+
+@end
16 RotaryWheelProject/SMViewController.h
@@ -0,0 +1,16 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import <UIKit/UIKit.h>
+#import "SMRotaryWheel.h"
+#import "SMRotaryProtocol.h"
+
+@interface SMViewController : UIViewController <SMRotaryProtocol>
+
+@property (nonatomic, strong) SMRotaryWheel *wheel;
+
+@end
40 RotaryWheelProject/SMViewController.m
@@ -0,0 +1,40 @@
+//
+// SMRotaryWheel.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 studiomagnolia.com. All rights reserved.
+
+#import "SMViewController.h"
+
+@implementation SMViewController
+
+@synthesize wheel;
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Release any cached data, images, etc that aren't in use.
+}
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ wheel = [[SMRotaryWheel alloc] initWithFrame:CGRectMake(0, 0, 200, 200)
+ andDelegate:self
+ withSections:8];
+
+ wheel.center = CGPointMake(160, 240);
+ [self.view addSubview:wheel];
+
+}
+
+- (void) didChangeValue:(NSString *)newValue {
+
+
+
+}
+@end
BIN RotaryWheelProject/bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/centerButton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 RotaryWheelProject/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
119 RotaryWheelProject/en.lproj/SMViewController.xib
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C25</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1919</string>
+ <string key="IBDocument.AppKitVersion">1138.11</string>
+ <string key="IBDocument.HIToolboxVersion">566.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">916</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">SMViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">7</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">SMViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/SMViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">916</string>
+ </data>
+</archive>
BIN RotaryWheelProject/icon0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN RotaryWheelProject/icon7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 RotaryWheelProject/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// RotaryWheelProject
+//
+// Created by cesarerocchi on 2/10/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "SMAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([SMAppDelegate class]));
+ }
+}
BIN RotaryWheelProject/segment.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 392c29f

Please sign in to comment.
Something went wrong with that request. Please try again.