Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial port to Xcode 4.

  • Loading branch information...
commit 071e6c93117e7a3092a5848278de801440f7bff1 0 parents
@bmeurer authored
Showing with 2,656 additions and 0 deletions.
  1. +1 −0  .gitattributes
  2. +7 −0 .gitignore
  3. +439 −0 FlashLight.xcodeproj/project.pbxproj
  4. BIN  FlashLight/Default.png
  5. BIN  FlashLight/Default@2x.png
  6. +43 −0 FlashLight/FLAppDelegate.h
  7. +58 −0 FlashLight/FLAppDelegate.m
  8. +54 −0 FlashLight/FLInfoViewController.h
  9. +89 −0 FlashLight/FLInfoViewController.m
  10. +54 −0 FlashLight/FLRootViewController.h
  11. +243 −0 FlashLight/FLRootViewController.m
  12. +54 −0 FlashLight/FLTorch.h
  13. +167 −0 FlashLight/FLTorch.m
  14. +54 −0 FlashLight/FLTouchView.h
  15. +76 −0 FlashLight/FLTouchView.m
  16. +47 −0 FlashLight/FlashLight-Info.plist
  17. +40 −0 FlashLight/FlashLight-Prefix.pch
  18. BIN  FlashLight/Icon-72.png
  19. BIN  FlashLight/Icon-Small-50.png
  20. BIN  FlashLight/Icon-Small.png
  21. BIN  FlashLight/Icon-Small@2x.png
  22. BIN  FlashLight/Icon.png
  23. BIN  FlashLight/Icon@2x.png
  24. BIN  FlashLight/InfoBackground.png
  25. BIN  FlashLight/InfoBackground@2x.png
  26. +483 −0 FlashLight/InfoViewController.xib
  27. BIN  FlashLight/Led.png
  28. BIN  FlashLight/Led@2x.png
  29. +272 −0 FlashLight/MainWindow.xib
  30. +438 −0 FlashLight/RootViewController.xib
  31. BIN  FlashLight/Switch.png
  32. BIN  FlashLight/Switch@2x.png
  33. BIN  FlashLight/Tick.caf
  34. BIN  FlashLight/iTunesArtwork
  35. +37 −0 FlashLight/main.m
1  .gitattributes
@@ -0,0 +1 @@
+*.pbxproj -crlf -diff -merge
7 .gitignore
@@ -0,0 +1,7 @@
+*xcodeproj/*mode*
+*xcodeproj/*pbxuser
+*xcodeproj/*per*
+*xcodeproj/project.xcworkspace
+*xcodeproj/xcuserdata
+.DS_Store
+*.pbxuser
439 FlashLight.xcodeproj/project.pbxproj
@@ -0,0 +1,439 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ C750DA3D13EA9B6D00531734 /* Tick.caf in Resources */ = {isa = PBXBuildFile; fileRef = C750DA3C13EA9B6D00531734 /* Tick.caf */; };
+ C750DA3F13EA9D8A00531734 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C750DA3E13EA9D8A00531734 /* AudioToolbox.framework */; };
+ C750DA4313EAA6E300531734 /* FLInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C750DA4113EAA6E300531734 /* FLInfoViewController.m */; };
+ C750DA4413EAA6E300531734 /* InfoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4213EAA6E300531734 /* InfoViewController.xib */; };
+ C750DA4613EAB5C700531734 /* InfoBackground@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4513EAB5C700531734 /* InfoBackground@2x.png */; };
+ C750DA4E13EAE7BB00531734 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4A13EAE7BB00531734 /* Default.png */; };
+ C750DA4F13EAE7BB00531734 /* InfoBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4B13EAE7BB00531734 /* InfoBackground.png */; };
+ C750DA5013EAE7BB00531734 /* Led.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4C13EAE7BB00531734 /* Led.png */; };
+ C750DA5113EAE7BB00531734 /* Switch.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA4D13EAE7BB00531734 /* Switch.png */; };
+ C750DA6413EAEAFC00531734 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA5D13EAEAFC00531734 /* Icon-72.png */; };
+ C750DA6513EAEAFC00531734 /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA5E13EAEAFC00531734 /* Icon-Small-50.png */; };
+ C750DA6613EAEAFC00531734 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA5F13EAEAFC00531734 /* Icon-Small.png */; };
+ C750DA6713EAEAFC00531734 /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA6013EAEAFC00531734 /* Icon-Small@2x.png */; };
+ C750DA6813EAEAFC00531734 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA6113EAEAFC00531734 /* Icon.png */; };
+ C750DA6913EAEAFC00531734 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C750DA6213EAEAFC00531734 /* Icon@2x.png */; };
+ C750DA6A13EAEAFC00531734 /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = C750DA6313EAEAFC00531734 /* iTunesArtwork */; };
+ C78667ED13E72303008426E9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C78667EC13E72303008426E9 /* UIKit.framework */; };
+ C78667EF13E72303008426E9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C78667EE13E72303008426E9 /* Foundation.framework */; };
+ C78667F113E72303008426E9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C78667F013E72303008426E9 /* CoreGraphics.framework */; };
+ C78667F913E72303008426E9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C78667F813E72303008426E9 /* main.m */; };
+ C78667FD13E72303008426E9 /* FLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C78667FC13E72303008426E9 /* FLAppDelegate.m */; };
+ C786680313E72303008426E9 /* FLRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C786680213E72303008426E9 /* FLRootViewController.m */; };
+ C786681113E7242F008426E9 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C786680F13E7242F008426E9 /* RootViewController.xib */; };
+ C786681213E7242F008426E9 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C786681013E7242F008426E9 /* MainWindow.xib */; };
+ C786681613E7243E008426E9 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C786681313E7243E008426E9 /* Default@2x.png */; };
+ C786681713E7243E008426E9 /* Led@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C786681413E7243E008426E9 /* Led@2x.png */; };
+ C786681813E7243E008426E9 /* Switch@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C786681513E7243E008426E9 /* Switch@2x.png */; };
+ C786681C13E72F89008426E9 /* FLTouchView.m in Sources */ = {isa = PBXBuildFile; fileRef = C786681B13E72F89008426E9 /* FLTouchView.m */; };
+ C786681E13E75083008426E9 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C786681D13E75083008426E9 /* AVFoundation.framework */; };
+ C786682113E800CF008426E9 /* FLTorch.m in Sources */ = {isa = PBXBuildFile; fileRef = C786682013E800CE008426E9 /* FLTorch.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ C750DA3C13EA9B6D00531734 /* Tick.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Tick.caf; sourceTree = "<group>"; };
+ C750DA3E13EA9D8A00531734 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ C750DA4013EAA6E300531734 /* FLInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLInfoViewController.h; sourceTree = "<group>"; };
+ C750DA4113EAA6E300531734 /* FLInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLInfoViewController.m; sourceTree = "<group>"; };
+ C750DA4213EAA6E300531734 /* InfoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InfoViewController.xib; sourceTree = "<group>"; };
+ C750DA4513EAB5C700531734 /* InfoBackground@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "InfoBackground@2x.png"; sourceTree = "<group>"; };
+ C750DA4A13EAE7BB00531734 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ C750DA4B13EAE7BB00531734 /* InfoBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = InfoBackground.png; sourceTree = "<group>"; };
+ C750DA4C13EAE7BB00531734 /* Led.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Led.png; sourceTree = "<group>"; };
+ C750DA4D13EAE7BB00531734 /* Switch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Switch.png; sourceTree = "<group>"; };
+ C750DA5D13EAEAFC00531734 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
+ C750DA5E13EAEAFC00531734 /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-50.png"; sourceTree = "<group>"; };
+ C750DA5F13EAEAFC00531734 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = "<group>"; };
+ C750DA6013EAEAFC00531734 /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = "<group>"; };
+ C750DA6113EAEAFC00531734 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
+ C750DA6213EAEAFC00531734 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
+ C750DA6313EAEAFC00531734 /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; path = iTunesArtwork; sourceTree = "<group>"; };
+ C78667E813E72303008426E9 /* FlashLight.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlashLight.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C78667EC13E72303008426E9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ C78667EE13E72303008426E9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ C78667F013E72303008426E9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ C78667F413E72303008426E9 /* FlashLight-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FlashLight-Info.plist"; sourceTree = "<group>"; };
+ C78667F813E72303008426E9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ C78667FA13E72303008426E9 /* FlashLight-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FlashLight-Prefix.pch"; sourceTree = "<group>"; };
+ C78667FB13E72303008426E9 /* FLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FLAppDelegate.h; sourceTree = "<group>"; };
+ C78667FC13E72303008426E9 /* FLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLAppDelegate.m; sourceTree = "<group>"; };
+ C786680113E72303008426E9 /* FLRootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FLRootViewController.h; sourceTree = "<group>"; };
+ C786680213E72303008426E9 /* FLRootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLRootViewController.m; sourceTree = "<group>"; };
+ C786680F13E7242F008426E9 /* RootViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = "<group>"; };
+ C786681013E7242F008426E9 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
+ C786681313E7243E008426E9 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ C786681413E7243E008426E9 /* Led@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Led@2x.png"; sourceTree = "<group>"; };
+ C786681513E7243E008426E9 /* Switch@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Switch@2x.png"; sourceTree = "<group>"; };
+ C786681A13E72F89008426E9 /* FLTouchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLTouchView.h; sourceTree = "<group>"; };
+ C786681B13E72F89008426E9 /* FLTouchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTouchView.m; sourceTree = "<group>"; };
+ C786681D13E75083008426E9 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+ C786681F13E800CE008426E9 /* FLTorch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLTorch.h; sourceTree = "<group>"; };
+ C786682013E800CE008426E9 /* FLTorch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTorch.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ C78667E513E72303008426E9 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C750DA3F13EA9D8A00531734 /* AudioToolbox.framework in Frameworks */,
+ C786681E13E75083008426E9 /* AVFoundation.framework in Frameworks */,
+ C78667ED13E72303008426E9 /* UIKit.framework in Frameworks */,
+ C78667EF13E72303008426E9 /* Foundation.framework in Frameworks */,
+ C78667F113E72303008426E9 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ C750DA3B13EA9B5D00531734 /* Sounds */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA3C13EA9B6D00531734 /* Tick.caf */,
+ );
+ name = Sounds;
+ sourceTree = "<group>";
+ };
+ C750DA4713EAE5F500531734 /* View Controllers */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA4013EAA6E300531734 /* FLInfoViewController.h */,
+ C750DA4113EAA6E300531734 /* FLInfoViewController.m */,
+ C786680113E72303008426E9 /* FLRootViewController.h */,
+ C786680213E72303008426E9 /* FLRootViewController.m */,
+ );
+ name = "View Controllers";
+ sourceTree = "<group>";
+ };
+ C750DA4813EAE60300531734 /* Views */ = {
+ isa = PBXGroup;
+ children = (
+ C786681A13E72F89008426E9 /* FLTouchView.h */,
+ C786681B13E72F89008426E9 /* FLTouchView.m */,
+ );
+ name = Views;
+ sourceTree = "<group>";
+ };
+ C750DA4913EAE61600531734 /* Domain */ = {
+ isa = PBXGroup;
+ children = (
+ C786681F13E800CE008426E9 /* FLTorch.h */,
+ C786682013E800CE008426E9 /* FLTorch.m */,
+ );
+ name = Domain;
+ sourceTree = "<group>";
+ };
+ C750DA5B13EAEAD700531734 /* Launch Images */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA4A13EAE7BB00531734 /* Default.png */,
+ C786681313E7243E008426E9 /* Default@2x.png */,
+ );
+ name = "Launch Images";
+ sourceTree = "<group>";
+ };
+ C750DA5C13EAEAE600531734 /* Icons */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA5D13EAEAFC00531734 /* Icon-72.png */,
+ C750DA5E13EAEAFC00531734 /* Icon-Small-50.png */,
+ C750DA5F13EAEAFC00531734 /* Icon-Small.png */,
+ C750DA6013EAEAFC00531734 /* Icon-Small@2x.png */,
+ C750DA6113EAEAFC00531734 /* Icon.png */,
+ C750DA6213EAEAFC00531734 /* Icon@2x.png */,
+ C750DA6313EAEAFC00531734 /* iTunesArtwork */,
+ );
+ name = Icons;
+ sourceTree = "<group>";
+ };
+ C78667DD13E72303008426E9 = {
+ isa = PBXGroup;
+ children = (
+ C78667F213E72303008426E9 /* FlashLight */,
+ C78667EB13E72303008426E9 /* Frameworks */,
+ C78667E913E72303008426E9 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ C78667E913E72303008426E9 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ C78667E813E72303008426E9 /* FlashLight.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ C78667EB13E72303008426E9 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA3E13EA9D8A00531734 /* AudioToolbox.framework */,
+ C786681D13E75083008426E9 /* AVFoundation.framework */,
+ C78667F013E72303008426E9 /* CoreGraphics.framework */,
+ C78667EE13E72303008426E9 /* Foundation.framework */,
+ C78667EC13E72303008426E9 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ C78667F213E72303008426E9 /* FlashLight */ = {
+ isa = PBXGroup;
+ children = (
+ C786681913E72472008426E9 /* Classes */,
+ C786680C13E7232C008426E9 /* Resources */,
+ C78667F313E72303008426E9 /* Other Sources */,
+ );
+ path = FlashLight;
+ sourceTree = "<group>";
+ };
+ C78667F313E72303008426E9 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ C78667F813E72303008426E9 /* main.m */,
+ C78667FA13E72303008426E9 /* FlashLight-Prefix.pch */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ C786680C13E7232C008426E9 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ C786680E13E7240E008426E9 /* IBFiles */,
+ C750DA5C13EAEAE600531734 /* Icons */,
+ C786680D13E72332008426E9 /* Images */,
+ C750DA3B13EA9B5D00531734 /* Sounds */,
+ C750DA5B13EAEAD700531734 /* Launch Images */,
+ C78667F413E72303008426E9 /* FlashLight-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ C786680D13E72332008426E9 /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA4B13EAE7BB00531734 /* InfoBackground.png */,
+ C750DA4513EAB5C700531734 /* InfoBackground@2x.png */,
+ C750DA4C13EAE7BB00531734 /* Led.png */,
+ C786681413E7243E008426E9 /* Led@2x.png */,
+ C750DA4D13EAE7BB00531734 /* Switch.png */,
+ C786681513E7243E008426E9 /* Switch@2x.png */,
+ );
+ name = Images;
+ sourceTree = "<group>";
+ };
+ C786680E13E7240E008426E9 /* IBFiles */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA4213EAA6E300531734 /* InfoViewController.xib */,
+ C786681013E7242F008426E9 /* MainWindow.xib */,
+ C786680F13E7242F008426E9 /* RootViewController.xib */,
+ );
+ name = IBFiles;
+ sourceTree = "<group>";
+ };
+ C786681913E72472008426E9 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ C750DA4913EAE61600531734 /* Domain */,
+ C750DA4813EAE60300531734 /* Views */,
+ C750DA4713EAE5F500531734 /* View Controllers */,
+ C78667FB13E72303008426E9 /* FLAppDelegate.h */,
+ C78667FC13E72303008426E9 /* FLAppDelegate.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ C78667E713E72303008426E9 /* FlashLight */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C786680913E72304008426E9 /* Build configuration list for PBXNativeTarget "FlashLight" */;
+ buildPhases = (
+ C78667E413E72303008426E9 /* Sources */,
+ C78667E513E72303008426E9 /* Frameworks */,
+ C78667E613E72303008426E9 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FlashLight;
+ productName = FlashLight;
+ productReference = C78667E813E72303008426E9 /* FlashLight.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ C78667DF13E72303008426E9 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ ORGANIZATIONNAME = "Universität Siegen";
+ };
+ buildConfigurationList = C78667E213E72303008426E9 /* Build configuration list for PBXProject "FlashLight" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = C78667DD13E72303008426E9;
+ productRefGroup = C78667E913E72303008426E9 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ C78667E713E72303008426E9 /* FlashLight */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ C78667E613E72303008426E9 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C786681113E7242F008426E9 /* RootViewController.xib in Resources */,
+ C786681213E7242F008426E9 /* MainWindow.xib in Resources */,
+ C786681613E7243E008426E9 /* Default@2x.png in Resources */,
+ C786681713E7243E008426E9 /* Led@2x.png in Resources */,
+ C786681813E7243E008426E9 /* Switch@2x.png in Resources */,
+ C750DA3D13EA9B6D00531734 /* Tick.caf in Resources */,
+ C750DA4413EAA6E300531734 /* InfoViewController.xib in Resources */,
+ C750DA4613EAB5C700531734 /* InfoBackground@2x.png in Resources */,
+ C750DA4E13EAE7BB00531734 /* Default.png in Resources */,
+ C750DA4F13EAE7BB00531734 /* InfoBackground.png in Resources */,
+ C750DA5013EAE7BB00531734 /* Led.png in Resources */,
+ C750DA5113EAE7BB00531734 /* Switch.png in Resources */,
+ C750DA6413EAEAFC00531734 /* Icon-72.png in Resources */,
+ C750DA6513EAEAFC00531734 /* Icon-Small-50.png in Resources */,
+ C750DA6613EAEAFC00531734 /* Icon-Small.png in Resources */,
+ C750DA6713EAEAFC00531734 /* Icon-Small@2x.png in Resources */,
+ C750DA6813EAEAFC00531734 /* Icon.png in Resources */,
+ C750DA6913EAEAFC00531734 /* Icon@2x.png in Resources */,
+ C750DA6A13EAEAFC00531734 /* iTunesArtwork in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ C78667E413E72303008426E9 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C78667F913E72303008426E9 /* main.m in Sources */,
+ C78667FD13E72303008426E9 /* FLAppDelegate.m in Sources */,
+ C786680313E72303008426E9 /* FLRootViewController.m in Sources */,
+ C786681C13E72F89008426E9 /* FLTouchView.m in Sources */,
+ C786682113E800CF008426E9 /* FLTorch.m in Sources */,
+ C750DA4313EAA6E300531734 /* FLInfoViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ C786680713E72304008426E9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 24;
+ 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.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ SDKROOT = iphoneos;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ C786680813E72304008426E9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ CURRENT_PROJECT_VERSION = 24;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+ C786680A13E72304008426E9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FlashLight/FlashLight-Prefix.pch";
+ INFOPLIST_FILE = "FlashLight/FlashLight-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ C786680B13E72304008426E9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "FlashLight/FlashLight-Prefix.pch";
+ INFOPLIST_FILE = "FlashLight/FlashLight-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C78667E213E72303008426E9 /* Build configuration list for PBXProject "FlashLight" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C786680713E72304008426E9 /* Debug */,
+ C786680813E72304008426E9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C786680913E72304008426E9 /* Build configuration list for PBXNativeTarget "FlashLight" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C786680A13E72304008426E9 /* Debug */,
+ C786680B13E72304008426E9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = C78667DF13E72303008426E9 /* Project object */;
+}
BIN  FlashLight/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Default@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 FlashLight/FLAppDelegate.h
@@ -0,0 +1,43 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+
+@class FLRootViewController;
+
+
+@interface FLAppDelegate : NSObject <UIApplicationDelegate> {
+@private
+ FLRootViewController *_rootViewController;
+ UIWindow *_window;
+}
+
+@property (nonatomic, retain) FLRootViewController *rootViewController;
+@property (nonatomic, retain) UIWindow *window;
+
+@end
58 FlashLight/FLAppDelegate.m
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import "FLAppDelegate.h"
+#import "FLRootViewController.h"
+
+
+@implementation FLAppDelegate
+
+@synthesize rootViewController = _rootViewController;
+@synthesize window = _window;
+
+
+- (void)dealloc
+{
+ [_rootViewController release], _rootViewController = nil;
+ [_window release], _window = nil;
+ [super dealloc];
+}
+
+
+#pragma mark -
+#pragma mark UIApplicationDelegate
+
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [self.window setRootViewController:self.rootViewController];
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+
+@end
54 FlashLight/FLInfoViewController.h
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+
+@protocol FLInfoViewControllerDelegate;
+
+
+@interface FLInfoViewController : UIViewController {
+@private
+ id<FLInfoViewControllerDelegate> _delegate;
+ UILabel *_titleLabel;
+ UILabel *_versionLabel;
+}
+
+@property (nonatomic, assign) id<FLInfoViewControllerDelegate> delegate;
+@property (nonatomic, retain) IBOutlet UILabel *titleLabel;
+@property (nonatomic, retain) IBOutlet UILabel *versionLabel;
+
+- (IBAction)doneBarButtonItemClicked:(id)sender;
+
+@end
+
+
+@protocol FLInfoViewControllerDelegate <NSObject>
+
+- (void)infoViewControllerDidFinish:(FLInfoViewController *)infoViewController;
+
+@end
89 FlashLight/FLInfoViewController.m
@@ -0,0 +1,89 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import "FLInfoViewController.h"
+
+
+@implementation FLInfoViewController
+
+@synthesize delegate = _delegate;
+@synthesize titleLabel = _titleLabel;
+@synthesize versionLabel = _versionLabel;
+
+
+- (void)dealloc
+{
+ [_titleLabel release], _titleLabel = nil;
+ [_versionLabel release], _versionLabel = nil;
+ [super dealloc];
+}
+
+
+#pragma mark -
+#pragma mark Actions
+
+
+- (IBAction)doneBarButtonItemClicked:(id)sender
+{
+ [self.delegate infoViewControllerDidFinish:self];
+}
+
+
+#pragma mark -
+#pragma mark UIViewController
+
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"InfoBackground"]]];
+
+ // Generate the titleLabel and versionLabel from the Info.plist strings
+ NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
+ self.titleLabel.text = [infoDictionary objectForKey:@"CFBundleDisplayName"];
+ self.versionLabel.text = [NSString stringWithFormat:@"%@ (%@)",
+ [infoDictionary objectForKey:@"CFBundleShortVersionString"],
+ [infoDictionary objectForKey:@"CFBundleVersion"]];
+
+}
+
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ self.titleLabel = nil;
+ self.versionLabel = nil;
+}
+
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+
+@end
54 FlashLight/FLRootViewController.h
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <AudioToolbox/AudioToolbox.h>
+
+#import "FLInfoViewController.h"
+#import "FLTouchView.h"
+#import "FLTorch.h"
+
+
+@interface FLRootViewController : UIViewController <FLInfoViewControllerDelegate, FLTouchViewDelegate, FLTorchDelegate> {
+@private
+ UIImageView *_ledImageView;
+ UIView *_switchView;
+ BOOL _touchActive;
+ FLTouchView *_touchView;
+ FLTorch *_torch;
+ SystemSoundID _tickSoundID;
+ BOOL _tickSoundRegistered;
+}
+
+@property (nonatomic, retain) IBOutlet UIImageView *ledImageView;
+@property (nonatomic, retain) IBOutlet UIView *switchView;
+@property (nonatomic, retain) IBOutlet FLTouchView *touchView;
+
+@property (nonatomic, retain, readonly) FLTorch *torch;
+
+- (IBAction)infoButtonClicked:(id)sender;
+
+@end
243 FlashLight/FLRootViewController.m
@@ -0,0 +1,243 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import "FLRootViewController.h"
+
+
+@interface FLRootViewController ()
+
+- (void)applicationDidBecomeActiveNotification:(NSNotification *)notification;
+- (void)synchronize;
+
+@end
+
+
+@implementation FLRootViewController
+
+@synthesize ledImageView = _ledImageView;
+@synthesize switchView = _switchView;
+@synthesize touchView = _touchView;
+@synthesize torch = _torch;
+
+
+- (void)dealloc
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [_ledImageView release], _ledImageView = nil;
+ [_switchView release], _switchView = nil;
+ [_touchView setDelegate:nil];
+ [_touchView release], _touchView = nil;
+ [_torch setDelegate:nil];
+ [_torch release], _torch = nil;
+ if (_tickSoundRegistered) {
+ AudioServicesDisposeSystemSoundID(_tickSoundID);
+ _tickSoundRegistered = NO;
+ }
+ [super dealloc];
+}
+
+
+#pragma mark -
+#pragma mark Properties
+
+
+- (FLTorch *)torch
+{
+ if (!_torch) {
+ _torch = [[FLTorch alloc] init];
+ _torch.delegate = self;
+ }
+ return _torch;
+}
+
+
+#pragma mark -
+#pragma mark Actions
+
+
+- (IBAction)infoButtonClicked:(id)sender
+{
+ FLInfoViewController *infoViewController = [[FLInfoViewController alloc] initWithNibName:@"InfoViewController" bundle:nil];
+ infoViewController.delegate = self;
+ [self presentModalViewController:infoViewController animated:YES];
+ [infoViewController release];
+}
+
+
+#pragma mark -
+#pragma mark Private
+
+
+- (void)applicationDidBecomeActiveNotification:(NSNotification *)notification
+{
+ [self performSelectorOnMainThread:@selector(synchronize) withObject:nil waitUntilDone:NO];
+}
+
+
+- (void)synchronize
+{
+ CGSize touchViewSize = [self.touchView frame].size;
+ CGRect switchViewFrame = [self.switchView frame];
+ [self.torch setEnabled:(switchViewFrame.origin.y + switchViewFrame.size.height / 2.0f < touchViewSize.height / 2.0f)];
+}
+
+
+#pragma mark -
+#pragma mark FLInforViewControllerDelegate
+
+
+- (void)infoViewControllerDidFinish:(FLInfoViewController *)infoViewController
+{
+ [infoViewController dismissModalViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark FLTouchViewDelegate
+
+
+- (void)touchView:(FLTouchView *)touchView touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ if (_touchActive) {
+ [self touchView:touchView touchesEnded:touches withEvent:event];
+ }
+ CGPoint location = [[touches anyObject] locationInView:touchView];
+ if (CGRectContainsPoint([_switchView frame], location)) {
+ _touchActive = YES;
+ [self touchView:touchView touchesMoved:touches withEvent:event];
+ }
+}
+
+
+- (void)touchView:(FLTouchView *)touchView touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [self touchView:touchView touchesEnded:touches withEvent:event];
+}
+
+
+- (void)touchView:(FLTouchView *)touchView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ if (_touchActive) {
+ CGPoint location = [[touches anyObject] locationInView:touchView];
+ CGSize touchViewSize = [touchView frame].size;
+ CGRect switchViewFrame = [self.switchView frame];
+ switchViewFrame.origin.y = location.y - switchViewFrame.size.height / 2.0f;
+ if (switchViewFrame.origin.y + switchViewFrame.size.height / 2.0f < touchViewSize.height / 2.0f) {
+ switchViewFrame.origin.y = 0.0f;
+ }
+ else {
+ switchViewFrame.origin.y = [self.touchView frame].size.height - switchViewFrame.size.height;
+ }
+ [UIView animateWithDuration:0.1f animations:^{
+ [self.switchView setFrame:switchViewFrame];
+ }];
+ [self synchronize];
+ _touchActive = NO;
+ }
+}
+
+
+- (void)touchView:(FLTouchView *)touchView touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ if (_touchActive) {
+ CGPoint location = [[touches anyObject] locationInView:touchView];
+ CGSize touchViewSize = [touchView frame].size;
+ CGRect switchViewFrame = [_switchView frame];
+ switchViewFrame.origin.y = location.y - switchViewFrame.size.height / 2.0f;
+ if (switchViewFrame.origin.y < 0.0f) {
+ switchViewFrame.origin.y = 0.0f;
+ }
+ else if (switchViewFrame.origin.y + switchViewFrame.size.height > touchViewSize.height) {
+ switchViewFrame.origin.y = touchViewSize.height - switchViewFrame.size.height;
+ }
+ [self.switchView setFrame:switchViewFrame];
+ [self synchronize];
+ }
+}
+
+
+#pragma mark -
+#pragma mark FLTorchDelegate
+
+
+- (void)torch:(FLTorch *)torch didChangeState:(BOOL)enabled
+{
+ if ([self.ledImageView isHidden] != !enabled) {
+ [self.ledImageView setHidden:!enabled];
+ if (!_tickSoundRegistered) {
+ CFURLRef tickSoundURL = (CFURLRef)[[NSBundle mainBundle] URLForResource:@"Tick" withExtension:@"caf"];
+ if (tickSoundURL && AudioServicesCreateSystemSoundID(tickSoundURL, &_tickSoundID) == kAudioServicesNoError) {
+ _tickSoundRegistered = YES;
+ }
+ }
+ if (_tickSoundRegistered) {
+ AudioServicesPlaySystemSound(_tickSoundID);
+ }
+ }
+}
+
+
+#pragma mark -
+#pragma mark UIViewController
+
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Default"]]];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(applicationDidBecomeActiveNotification:)
+ name:UIApplicationDidBecomeActiveNotification
+ object:nil];
+}
+
+
+- (void)viewWillAppear:(BOOL)animated
+{
+ [super viewWillAppear:animated];
+ [self synchronize];
+}
+
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ self.ledImageView = nil;
+ self.switchView = nil;
+ self.touchView.delegate = nil;
+ self.touchView = nil;
+}
+
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+
+@end
54 FlashLight/FLTorch.h
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import <AVFoundation/AVFoundation.h>
+
+
+@protocol FLTorchDelegate;
+
+
+@interface FLTorch : NSObject {
+@private
+ AVCaptureDevice *_device;
+ AVCaptureSession *_session;
+ dispatch_queue_t _queue;
+ id<FLTorchDelegate> _delegate;
+}
+
+@property (nonatomic, assign) id<FLTorchDelegate> delegate;
+@property (nonatomic, assign, getter=isEnabled) BOOL enabled;
+
+@end
+
+
+@protocol FLTorchDelegate <NSObject>
+
+@optional
+
+- (void)torch:(FLTorch *)torch didChangeState:(BOOL)enabled;
+
+@end
167 FlashLight/FLTorch.m
@@ -0,0 +1,167 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import "FLTorch.h"
+
+
+@implementation FLTorch
+
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ // Setup a dispatch queue to handle the torch stuff
+ _queue = dispatch_queue_create("de.benediktmeurer.FlashLight.Torch", NULL);
+ if (!_queue) {
+ [self release];
+ return nil;
+ }
+
+ // Perform the initialization asynchronously
+ dispatch_async(_queue, ^{
+ // Look for a capture device with a torch
+ for (AVCaptureDevice *device in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {
+ if ([device hasTorch] && [device isTorchModeSupported:AVCaptureTorchModeOn] && [device isTorchModeSupported:AVCaptureTorchModeOff]) {
+ _device = [device retain];
+ break;
+ }
+ }
+ if (_device) {
+ // Setup a session and capture input/output
+ _session = [[AVCaptureSession alloc] init];
+ if (_session) {
+ AVCaptureOutput *output = [[[AVCaptureVideoDataOutput alloc] init] autorelease];
+ if (output) {
+ NSError *error = nil;
+ AVCaptureInput *input = [AVCaptureDeviceInput deviceInputWithDevice:_device error:&error];
+ if (input) {
+ // Configure the device and the session
+ if ([_device lockForConfiguration:&error]) {
+ [_session beginConfiguration];
+ [_session addInput:input];
+ [_session addOutput:output];
+ [_session commitConfiguration];
+ [_device unlockForConfiguration];
+ [_session startRunning];
+ }
+ else {
+ NSLog(@"Failed to lock device %@ for configuration: %@", _device, error);
+ [error release];
+ [_session release], _session = nil;
+ [_device release], _device = nil;
+ }
+ }
+ else {
+ NSLog(@"Failed to setup device %@ as capture input: %@", _device, error);
+ [error release];
+ }
+ }
+ }
+ }
+ });
+ }
+ return self;
+}
+
+
+- (void)dealloc
+{
+ dispatch_sync(_queue, ^{
+ [_session stopRunning], [_session release], _session = nil;
+ [_device release], _device = nil;
+ });
+ if (_queue) dispatch_release(_queue), _queue = NULL;
+ [super dealloc];
+}
+
+
+#pragma mark -
+#pragma mark Properties
+
+
+- (id<FLTorchDelegate>)delegate
+{
+ __block id<FLTorchDelegate> delegate = nil;
+ dispatch_sync(_queue, ^{
+ delegate = [_delegate retain];
+ });
+ return [delegate autorelease];
+}
+
+
+- (void)setDelegate:(id<FLTorchDelegate>)delegate
+{
+ dispatch_async(_queue, ^{
+ _delegate = delegate;
+ });
+}
+
+
+- (BOOL)isEnabled
+{
+ __block BOOL enabled = NO;
+ dispatch_sync(_queue, ^{
+ enabled = ([_session isRunning] && ([_device torchMode] == AVCaptureTorchModeOn));
+ });
+ return enabled;
+}
+
+
+- (void)setEnabled:(BOOL)enabled
+{
+ dispatch_async(_queue, ^{
+ NSError *error = nil;
+ if ([_device lockForConfiguration:&error]) {
+ if (enabled) {
+ [_device setTorchMode:AVCaptureTorchModeOn];
+ }
+ else {
+ [_device setTorchMode:AVCaptureTorchModeOff];
+ }
+ [_device unlockForConfiguration];
+ if (![_session isRunning]) {
+ [_session startRunning];
+ }
+ }
+ else {
+ NSLog(@"Failed to lock device %@ for configuration: %@", _device, error);
+ [error release];
+ }
+
+ if ([_delegate respondsToSelector:@selector(torch:didChangeState:)]) {
+ id<FLTorchDelegate> delegate = [[_delegate retain] autorelease];
+ BOOL enabled = ([_session isRunning] && ([_device torchMode] == AVCaptureTorchModeOn));
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [delegate torch:self didChangeState:enabled];
+ });
+ }
+ });
+}
+
+
+@end
54 FlashLight/FLTouchView.h
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import <UIKit/UIKit.h>
+
+
+@protocol FLTouchViewDelegate;
+
+
+@interface FLTouchView : UIView {
+@private
+ id<FLTouchViewDelegate> _delegate;
+}
+
+@property (nonatomic, assign) IBOutlet id<FLTouchViewDelegate> delegate;
+
+@end
+
+
+@protocol FLTouchViewDelegate <NSObject>
+
+@optional
+
+- (void)touchView:(FLTouchView *)touchView touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
+- (void)touchView:(FLTouchView *)touchView touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
+- (void)touchView:(FLTouchView *)touchView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
+- (void)touchView:(FLTouchView *)touchView touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
+
+@end
+
76 FlashLight/FLTouchView.m
@@ -0,0 +1,76 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#import "FLTouchView.h"
+
+
+@implementation FLTouchView
+
+@synthesize delegate = _delegate;
+
+
+#pragma mark -
+#pragma mark UIResponder
+
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [super touchesBegan:touches withEvent:event];
+ if ([_delegate respondsToSelector:@selector(touchView:touchesBegan:withEvent:)]) {
+ [_delegate touchView:self touchesBegan:touches withEvent:event];
+ }
+}
+
+
+- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [super touchesCancelled:touches withEvent:event];
+ if ([_delegate respondsToSelector:@selector(touchView:touchesCancelled:withEvent:)]) {
+ [_delegate touchView:self touchesCancelled:touches withEvent:event];
+ }
+}
+
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [super touchesEnded:touches withEvent:event];
+ if ([_delegate respondsToSelector:@selector(touchView:touchesEnded:withEvent:)]) {
+ [_delegate touchView:self touchesEnded:touches withEvent:event];
+ }
+}
+
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ [super touchesEnded:touches withEvent:event];
+ if ([_delegate respondsToSelector:@selector(touchView:touchesMoved:withEvent:)]) {
+ [_delegate touchView:self touchesMoved:touches withEvent:event];
+ }
+}
+
+
+@end
47 FlashLight/FlashLight-Info.plist
@@ -0,0 +1,47 @@
+<?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>iFlashLight+</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array>
+ <string>Icon.png</string>
+ <string>Icon@2x.png</string>
+ <string>Icon-72.png</string>
+ </array>
+ <key>CFBundleIdentifier</key>
+ <string>de.benediktmeurer.${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>0.7</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>24</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>camera-flash</string>
+ <string>video-camera</string>
+ </array>
+ <key>UIStatusBarHidden</key>
+ <true/>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ </array>
+</dict>
+</plist>
40 FlashLight/FlashLight-Prefix.pch
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <Availability.h>
+
+#ifndef __IPHONE_3_0
+# warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#include <AudioToolbox/AudioToolbox.h>
+
+#ifdef __OBJC__
+# import <AVFoundation/AVFoundation.h>
+# import <Foundation/Foundation.h>
+# import <UIKit/UIKit.h>
+#endif
BIN  FlashLight/Icon-72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Icon-Small-50.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Icon-Small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Icon-Small@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Icon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/InfoBackground.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/InfoBackground@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
483 FlashLight/InfoViewController.xib
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">11A511</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1617</string>
+ <string key="IBDocument.AppKitVersion">1138</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">534</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>IBUILabel</string>
+ <string>IBUINavigationItem</string>
+ <string>IBUIBarButtonItem</string>
+ <string>IBUIView</string>
+ <string>IBUINavigationBar</string>
+ <string>IBProxyObject</string>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUINavigationBar" id="337657789">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrameSize">{320, 44}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="777741713"/>
+ <string key="NSReuseIdentifierKey">_NS:240</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIBarStyle">1</int>
+ <object class="NSColor" key="IBUITintColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4zNDY2MjA2NDE1IDAgMC4zNDczMzg1MTY3AA</bytes>
+ </object>
+ <object class="NSArray" key="IBUIItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUINavigationItem" id="1010466434">
+ <reference key="IBUINavigationBar" ref="337657789"/>
+ <string key="IBUITitle"/>
+ <object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="897190085">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIStyle">1</int>
+ <reference key="IBUINavigationItem" ref="1010466434"/>
+ <int key="IBUISystemItemIdentifier">0</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBUILabel" id="534436848">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{0, 459}, {320, 21}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:311</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Copyright © 2011 Benedikt Meurer</string>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">10</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC42IDAuNiAwLjYgMC42AA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUITextAlignment">1</int>
+ </object>
+ <object class="IBUILabel" id="777741713">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{0, 109}, {320, 97}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="16385248"/>
+ <string key="NSReuseIdentifierKey">_NS:311</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">iFlashLight+</string>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">48</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="85213299">
+ <int key="NSID">1</int>
+ </object>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <object class="NSColor" key="IBUIShadowColor" id="174300894">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
+ </object>
+ <string key="IBUIShadowOffset">{1, 1}</string>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUITextAlignment">1</int>
+ </object>
+ <object class="IBUILabel" id="653435348">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{0, 258}, {320, 21}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="102947399"/>
+ <string key="NSReuseIdentifierKey">_NS:311</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">X.Y (Z)</string>
+ <object class="NSFont" key="IBUIFont" id="919387860">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ <reference key="NSCustomColorSpace" ref="85213299"/>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <reference key="IBUIShadowColor" ref="174300894"/>
+ <string key="IBUIShadowOffset">{1, 1}</string>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUITextAlignment">1</int>
+ </object>
+ <object class="IBUILabel" id="16385248">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{0, 185}, {320, 21}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="653435348"/>
+ <string key="NSReuseIdentifierKey">_NS:311</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">for iPhone 4</string>
+ <reference key="IBUIFont" ref="919387860"/>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ <reference key="NSCustomColorSpace" ref="85213299"/>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <reference key="IBUIShadowColor" ref="174300894"/>
+ <string key="IBUIShadowOffset">{1, 1}</string>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUITextAlignment">1</int>
+ </object>
+ <object class="IBUILabel" id="102947399">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{38, 332}, {244, 60}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="534436848"/>
+ <string key="NSReuseIdentifierKey">_NS:311</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">May it be a light for you in dark places, when all other lights go out.</string>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <object class="NSColor" key="IBUITextColor" id="622026827">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <reference key="IBUIShadowColor" ref="174300894"/>
+ <string key="IBUIShadowOffset">{1, 1}</string>
+ <int key="IBUIBaselineAdjustment">1</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">2</int>
+ </object>
+ </object>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="337657789"/>
+ <reference key="IBUIBackgroundColor" ref="622026827"/>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">versionLabel</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="653435348"/>
+ </object>
+ <int key="connectionID">16</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">doneBarButtonItemClicked:</string>
+ <reference key="source" ref="897190085"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">titleLabel</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="777741713"/>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="534436848"/>
+ <reference ref="777741713"/>
+ <reference ref="16385248"/>
+ <reference ref="102947399"/>
+ <reference ref="653435348"/>
+ <reference ref="337657789"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">view</string>
+ </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="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="337657789"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1010466434"/>
+ </object>
+ <reference key="parent" ref="191373211"/>
+ <string key="objectName">navigationBar</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="1010466434"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="897190085"/>
+ </object>
+ <reference key="parent" ref="337657789"/>
+ <string key="objectName">navigationItem</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="897190085"/>
+ <reference key="parent" ref="1010466434"/>
+ <string key="objectName">doneBarButtonItem</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="534436848"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="777741713"/>
+ <reference key="parent" ref="191373211"/>
+ <string key="objectName">titleLabel</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="653435348"/>
+ <reference key="parent" ref="191373211"/>
+ <string key="objectName">versionLabel</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="16385248"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="102947399"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.CustomClassName</string>
+ <string>-2.IBPluginDependency</string>
+ <string>1.IBPluginDependency</string>
+ <string>10.IBPluginDependency</string>
+ <string>11.IBPluginDependency</string>
+ <string>12.IBPluginDependency</string>
+ <string>13.IBPluginDependency</string>
+ <string>14.IBPluginDependency</string>
+ <string>4.IBPluginDependency</string>
+ <string>8.IBPluginDependency</string>
+ <string>9.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>FLInfoViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">18</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">FLInfoViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">doneBarButtonItemClicked:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">doneBarButtonItemClicked:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">doneBarButtonItemClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>titleLabel</string>
+ <string>versionLabel</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UILabel</string>
+ <string>UILabel</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>titleLabel</string>
+ <string>versionLabel</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">titleLabel</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">versionLabel</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/FLInfoViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">534</string>
+ </data>
+</archive>
BIN  FlashLight/Led.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  FlashLight/Led@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
272 FlashLight/MainWindow.xib
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">11A511</string>
+ <string key="IBDocument.InterfaceBuilderVersion">907</string>
+ <string key="IBDocument.AppKitVersion">1138</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">141</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">RootViewController</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <bool key="IBUIWantsFullScreenLayout">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">rootViewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">controller</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">rootViewController</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">window</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.CustomClassName</string>
+ <string>-2.IBPluginDependency</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>FLRootViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>FLAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">17</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">FLAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">FLRootViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>ledImageView</string>
+ <string>switchView</string>
+ <string>touchView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIImageView</string>
+ <string>UIView</string>
+ <string>FLTouchView</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>ledImageView</string>
+ <string>switchView</string>
+ <string>touchView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">ledImageView</string>
+ <string key="candidateClassName">UIImageView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">switchView</string>
+ <string key="candidateClassName">UIView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">touchView</string>
+ <string key="candidateClassName">FLTouchView</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/FLRootViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">FLTouchView</string>
+ <string key="superclassName">UIView</string>