├── .gitignore ├── LICENSE ├── Podfile ├── Podfile.lock ├── README.md ├── UIForLumberjack.podspec ├── UIForLumberjack.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── kamil.xcuserdatad │ └── xcschemes │ ├── UIForLumberjack.xcscheme │ └── xcschememanagement.plist ├── UIForLumberjack.xcworkspace └── contents.xcworkspacedata ├── UIForLumberjack ├── UIForLumberjack-Prefix.pch ├── UIForLumberjack.h └── UIForLumberjack.m ├── UIForLumberjackExample ├── Podfile ├── Podfile.lock ├── UIForLumberjackExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcuserdata │ │ └── kamil.xcuserdatad │ │ └── xcschemes │ │ ├── UIForLumberjackExample.xcscheme │ │ └── xcschememanagement.plist ├── UIForLumberjackExample.xcworkspace │ └── contents.xcworkspacedata ├── UIForLumberjackExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── Main_iPhone.storyboard │ ├── FirstViewController.h │ ├── FirstViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ └── Contents.json │ │ ├── first.imageset │ │ │ ├── Contents.json │ │ │ ├── first.png │ │ │ └── first@2x.png │ │ └── second.imageset │ │ │ ├── Contents.json │ │ │ ├── second.png │ │ │ └── second@2x.png │ ├── SecondViewController.h │ ├── SecondViewController.m │ ├── UIForLumberjackExample-Info.plist │ ├── UIForLumberjackExample-Prefix.pch │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── UIForLumberjackExampleTests │ ├── UIForLumberjackExampleTests-Info.plist │ ├── UIForLumberjackExampleTests.m │ └── en.lproj │ │ └── InfoPlist.strings └── github-assets │ ├── UIForLumberjack-full-selectors.png │ ├── UIForLumberjack-full.png │ └── UIForLumberjack-small.png └── UIForLumberjackTests ├── UIForLumberjackTests-Info.plist ├── UIForLumberjackTests.m └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | #CocoaPods 21 | Pods 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Kamil Burczyk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, "6.0" 3 | 4 | target "UIForLumberjack" do 5 | 6 | pod 'CocoaLumberjack', '~> 2.0' 7 | 8 | end 9 | 10 | target "UIForLumberjackTests" do 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaLumberjack (2.0.1): 3 | - CocoaLumberjack/Default (= 2.0.1) 4 | - CocoaLumberjack/Extensions (= 2.0.1) 5 | - CocoaLumberjack/Core (2.0.1) 6 | - CocoaLumberjack/Default (2.0.1): 7 | - CocoaLumberjack/Core 8 | - CocoaLumberjack/Extensions (2.0.1): 9 | - CocoaLumberjack/Default 10 | 11 | DEPENDENCIES: 12 | - CocoaLumberjack (~> 2.0) 13 | 14 | SPEC CHECKSUMS: 15 | CocoaLumberjack: 019d1361244274a6138c788c6cb80baabc13fb8f 16 | 17 | COCOAPODS: 0.38.2 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UIForLumberjack 2 | =============== 3 | 4 | [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack) is probably the best logging system for iOS and OS X systems. With it's asynchronous logging, log levels and support for XcodeColors it's the ultimate solution for most projects. 5 | 6 | **UIForLumberjack** is the iOS UI library to display CocoaLumberjack logs on iOS device. 7 | 8 | ![Fullscreen log console](https://raw.github.com/burczyk/UIForLumberjack/master/UIForLumberjackExample/github-assets/UIForLumberjack-full.png) 9 | 10 | How to use it? 11 | -------------- 12 | 13 | Install from cocoapods: 14 | 15 | `pod UIForLumberjack` 16 | 17 | or just drag&drop `UIForLumberjack.h` and `UIForLumberjack.m` to your project. 18 | 19 | In your code all you have to do is to add a new logger: 20 | ```objective-c 21 | [DDLog addLogger:[UIForLumberjack sharedInstance]]; 22 | ``` 23 | 24 | and then just use generated UITableView with logs by adding it to whatever view you like: 25 | 26 | ```objective-c 27 | [[UIForLumberjack sharedInstance] showLogInView:self.view]; 28 | ``` 29 | 30 | UIForLumberjack uses autolayout to fill whole parent view, so you can easily configure it to be a fullscreen console: 31 | 32 | ![Fullscreen log console](https://raw.github.com/burczyk/UIForLumberjack/master/UIForLumberjackExample/github-assets/UIForLumberjack-full.png) 33 | 34 | or just occupy small view: 35 | 36 | ![Log console in small view](https://raw.github.com/burczyk/UIForLumberjack/master/UIForLumberjackExample/github-assets/UIForLumberjack-small.png) 37 | 38 | Extra features: 39 | --------------- 40 | 41 | After selecting row (method `tableView:didSelectRowAtIndexPath:`) log text changes to show you filename, selector and line from which log was called: 42 | 43 | ![Fullscreen log console with selectors and line numbers](https://raw.github.com/burczyk/UIForLumberjack/master/UIForLumberjackExample/github-assets/UIForLumberjack-full-selectors.png) 44 | 45 | `UITableView` section header contains green button `Hide Log` which performs `removeFromSuperview` action when tapped, so you can easily hide log view when not needed. 46 | 47 | Inspiration 48 | ----------- 49 | 50 | I was inspired by [LumberjackConsole](https://github.com/PTEz/LumberjackConsole) but when I tried to use it it had some issues with screen rotation and showed it's own status bar below system Status Bar which my client didn't want. My implementation is very simple (2 files total and just 177 lines in `.m` file!) but if you need more advanced solution you should definitely check [LumberjackConsole](https://github.com/PTEz/LumberjackConsole). 51 | 52 | Example 53 | ------- 54 | Open `UIForLumberjackExample` to see how it works although it is really that simple :) 55 | 56 | License 57 | ------- 58 | `UIForLumberjack` is available under the MIT license. See the LICENSE file for more info. 59 | -------------------------------------------------------------------------------- /UIForLumberjack.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "UIForLumberjack" 3 | s.version = "1.0.4" 4 | s.summary = "iOS UI library to display CocoaLumberjack logs on iOS device" 5 | 6 | s.description = <<-DESC 7 | 8 | UIForLumberjack is a tool that allows you to see your CocoaLumberjack logs 9 | on your iOS device. It creates additional logger which puts all the logs 10 | to UITableView that can be displayed in any UIView. With UIForLumberjack you can 11 | see all your logs without Xcode and debugger! 12 | 13 | DESC 14 | 15 | s.homepage = "https://github.com/burczyk/UIForLumberjack" 16 | s.license = { :type => 'MIT', :file => 'LICENSE' } 17 | s.author = { "Kamil Burczyk" => "kamil.burczyk@gmail.com" } 18 | s.platform = :ios, '6.0' 19 | s.source = { :git => "https://github.com/burczyk/UIForLumberjack.git", :tag => "1.0.4" } 20 | s.source_files = 'UIForLumberjack', 'UIForLumberjack/**/*.{h,m}' 21 | s.exclude_files = 'UIForLumberjackExample' 22 | s.frameworks = 'UIKit', 'Foundation' 23 | s.requires_arc = true 24 | s.dependency 'CocoaLumberjack', '~> 2.0' 25 | end 26 | -------------------------------------------------------------------------------- /UIForLumberjack.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 688A0CA1432C4EA89DEB69C7 /* libPods-UIForLumberjack.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7221CEBF0C994F39AA20C1E8 /* libPods-UIForLumberjack.a */; }; 11 | 8E809EC51887276900884B89 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809EC41887276900884B89 /* Foundation.framework */; }; 12 | 8E809ECA1887276900884B89 /* UIForLumberjack.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E809EC91887276900884B89 /* UIForLumberjack.h */; }; 13 | 8E809ECC1887276900884B89 /* UIForLumberjack.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809ECB1887276900884B89 /* UIForLumberjack.m */; }; 14 | 8E809ED31887276900884B89 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809ED21887276900884B89 /* XCTest.framework */; }; 15 | 8E809ED41887276900884B89 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809EC41887276900884B89 /* Foundation.framework */; }; 16 | 8E809ED61887276900884B89 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809ED51887276900884B89 /* UIKit.framework */; }; 17 | 8E809ED91887276900884B89 /* libUIForLumberjack.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809EC11887276900884B89 /* libUIForLumberjack.a */; }; 18 | 8E809EDF1887276900884B89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8E809EDD1887276900884B89 /* InfoPlist.strings */; }; 19 | 8E809EE11887276900884B89 /* UIForLumberjackTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809EE01887276900884B89 /* UIForLumberjackTests.m */; }; 20 | 8E809EEB1887290200884B89 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809EEA1887290200884B89 /* UIKit.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 8E809ED71887276900884B89 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 8E809EB91887276900884B89 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 8E809EC01887276900884B89; 29 | remoteInfo = UIForLumberjack; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXCopyFilesBuildPhase section */ 34 | 8E809EBF1887276900884B89 /* CopyFiles */ = { 35 | isa = PBXCopyFilesBuildPhase; 36 | buildActionMask = 2147483647; 37 | dstPath = "include/$(PRODUCT_NAME)"; 38 | dstSubfolderSpec = 16; 39 | files = ( 40 | 8E809ECA1887276900884B89 /* UIForLumberjack.h in CopyFiles */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXCopyFilesBuildPhase section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 0824C143D35B3C8F66986F85 /* Pods-UIForLumberjack.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UIForLumberjack.debug.xcconfig"; path = "Pods/Target Support Files/Pods-UIForLumberjack/Pods-UIForLumberjack.debug.xcconfig"; sourceTree = ""; }; 48 | 7221CEBF0C994F39AA20C1E8 /* libPods-UIForLumberjack.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-UIForLumberjack.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 8E809EC11887276900884B89 /* libUIForLumberjack.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libUIForLumberjack.a; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 8E809EC41887276900884B89 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 51 | 8E809EC81887276900884B89 /* UIForLumberjack-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIForLumberjack-Prefix.pch"; sourceTree = ""; }; 52 | 8E809EC91887276900884B89 /* UIForLumberjack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIForLumberjack.h; sourceTree = ""; }; 53 | 8E809ECB1887276900884B89 /* UIForLumberjack.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIForLumberjack.m; sourceTree = ""; }; 54 | 8E809ED11887276900884B89 /* UIForLumberjackTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIForLumberjackTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 8E809ED21887276900884B89 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 56 | 8E809ED51887276900884B89 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 57 | 8E809EDC1887276900884B89 /* UIForLumberjackTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIForLumberjackTests-Info.plist"; sourceTree = ""; }; 58 | 8E809EDE1887276900884B89 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 59 | 8E809EE01887276900884B89 /* UIForLumberjackTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIForLumberjackTests.m; sourceTree = ""; }; 60 | 8E809EEA1887290200884B89 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 61 | 8E809EF218872AE200884B89 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 62 | 8E809F0F18872AE200884B89 /* UIForLumberjackTestAppTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIForLumberjackTestAppTests-Info.plist"; sourceTree = ""; }; 63 | 8E809F1118872AE200884B89 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 64 | 8E809F1318872AE200884B89 /* UIForLumberjackTestAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIForLumberjackTestAppTests.m; sourceTree = ""; }; 65 | A87A8F4EB0D7F4FB35B729EB /* Pods-UIForLumberjack.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UIForLumberjack.release.xcconfig"; path = "Pods/Target Support Files/Pods-UIForLumberjack/Pods-UIForLumberjack.release.xcconfig"; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | 8E809EBE1887276900884B89 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | 8E809EEB1887290200884B89 /* UIKit.framework in Frameworks */, 74 | 8E809EC51887276900884B89 /* Foundation.framework in Frameworks */, 75 | 688A0CA1432C4EA89DEB69C7 /* libPods-UIForLumberjack.a in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 8E809ECE1887276900884B89 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 8E809ED31887276900884B89 /* XCTest.framework in Frameworks */, 84 | 8E809ED61887276900884B89 /* UIKit.framework in Frameworks */, 85 | 8E809ED41887276900884B89 /* Foundation.framework in Frameworks */, 86 | 8E809ED91887276900884B89 /* libUIForLumberjack.a in Frameworks */, 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | /* End PBXFrameworksBuildPhase section */ 91 | 92 | /* Begin PBXGroup section */ 93 | 8E809EB81887276900884B89 = { 94 | isa = PBXGroup; 95 | children = ( 96 | 8E809EC61887276900884B89 /* UIForLumberjack */, 97 | 8E809EDA1887276900884B89 /* UIForLumberjackTests */, 98 | 8E809F0D18872AE200884B89 /* UIForLumberjackTestAppTests */, 99 | 8E809EC31887276900884B89 /* Frameworks */, 100 | 8E809EC21887276900884B89 /* Products */, 101 | B761F80AF2CF597935AB5852 /* Pods */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | 8E809EC21887276900884B89 /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 8E809EC11887276900884B89 /* libUIForLumberjack.a */, 109 | 8E809ED11887276900884B89 /* UIForLumberjackTests.xctest */, 110 | ); 111 | name = Products; 112 | sourceTree = ""; 113 | }; 114 | 8E809EC31887276900884B89 /* Frameworks */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 8E809EEA1887290200884B89 /* UIKit.framework */, 118 | 8E809EC41887276900884B89 /* Foundation.framework */, 119 | 8E809ED21887276900884B89 /* XCTest.framework */, 120 | 8E809ED51887276900884B89 /* UIKit.framework */, 121 | 7221CEBF0C994F39AA20C1E8 /* libPods-UIForLumberjack.a */, 122 | 8E809EF218872AE200884B89 /* CoreGraphics.framework */, 123 | ); 124 | name = Frameworks; 125 | sourceTree = ""; 126 | }; 127 | 8E809EC61887276900884B89 /* UIForLumberjack */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 8E809EC91887276900884B89 /* UIForLumberjack.h */, 131 | 8E809ECB1887276900884B89 /* UIForLumberjack.m */, 132 | 8E809EC71887276900884B89 /* Supporting Files */, 133 | ); 134 | path = UIForLumberjack; 135 | sourceTree = ""; 136 | }; 137 | 8E809EC71887276900884B89 /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 8E809EC81887276900884B89 /* UIForLumberjack-Prefix.pch */, 141 | ); 142 | name = "Supporting Files"; 143 | sourceTree = ""; 144 | }; 145 | 8E809EDA1887276900884B89 /* UIForLumberjackTests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 8E809EE01887276900884B89 /* UIForLumberjackTests.m */, 149 | 8E809EDB1887276900884B89 /* Supporting Files */, 150 | ); 151 | path = UIForLumberjackTests; 152 | sourceTree = ""; 153 | }; 154 | 8E809EDB1887276900884B89 /* Supporting Files */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 8E809EDC1887276900884B89 /* UIForLumberjackTests-Info.plist */, 158 | 8E809EDD1887276900884B89 /* InfoPlist.strings */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | 8E809F0D18872AE200884B89 /* UIForLumberjackTestAppTests */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 8E809F1318872AE200884B89 /* UIForLumberjackTestAppTests.m */, 167 | 8E809F0E18872AE200884B89 /* Supporting Files */, 168 | ); 169 | path = UIForLumberjackTestAppTests; 170 | sourceTree = ""; 171 | }; 172 | 8E809F0E18872AE200884B89 /* Supporting Files */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 8E809F0F18872AE200884B89 /* UIForLumberjackTestAppTests-Info.plist */, 176 | 8E809F1018872AE200884B89 /* InfoPlist.strings */, 177 | ); 178 | name = "Supporting Files"; 179 | sourceTree = ""; 180 | }; 181 | B761F80AF2CF597935AB5852 /* Pods */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 0824C143D35B3C8F66986F85 /* Pods-UIForLumberjack.debug.xcconfig */, 185 | A87A8F4EB0D7F4FB35B729EB /* Pods-UIForLumberjack.release.xcconfig */, 186 | ); 187 | name = Pods; 188 | sourceTree = ""; 189 | }; 190 | /* End PBXGroup section */ 191 | 192 | /* Begin PBXNativeTarget section */ 193 | 8E809EC01887276900884B89 /* UIForLumberjack */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 8E809EE41887276900884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjack" */; 196 | buildPhases = ( 197 | A3915936766E4F808E41EA6C /* Check Pods Manifest.lock */, 198 | 8E809EBD1887276900884B89 /* Sources */, 199 | 8E809EBE1887276900884B89 /* Frameworks */, 200 | 8E809EBF1887276900884B89 /* CopyFiles */, 201 | B1FC9F7E0F70473396255B86 /* Copy Pods Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | ); 207 | name = UIForLumberjack; 208 | productName = UIForLumberjack; 209 | productReference = 8E809EC11887276900884B89 /* libUIForLumberjack.a */; 210 | productType = "com.apple.product-type.library.static"; 211 | }; 212 | 8E809ED01887276900884B89 /* UIForLumberjackTests */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 8E809EE71887276900884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackTests" */; 215 | buildPhases = ( 216 | 8E809ECD1887276900884B89 /* Sources */, 217 | 8E809ECE1887276900884B89 /* Frameworks */, 218 | 8E809ECF1887276900884B89 /* Resources */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | 8E809ED81887276900884B89 /* PBXTargetDependency */, 224 | ); 225 | name = UIForLumberjackTests; 226 | productName = UIForLumberjackTests; 227 | productReference = 8E809ED11887276900884B89 /* UIForLumberjackTests.xctest */; 228 | productType = "com.apple.product-type.bundle.unit-test"; 229 | }; 230 | /* End PBXNativeTarget section */ 231 | 232 | /* Begin PBXProject section */ 233 | 8E809EB91887276900884B89 /* Project object */ = { 234 | isa = PBXProject; 235 | attributes = { 236 | LastUpgradeCheck = 0700; 237 | ORGANIZATIONNAME = Sigmapoint; 238 | TargetAttributes = { 239 | 8E809ED01887276900884B89 = { 240 | TestTargetID = 8E809EEF18872AE200884B89; 241 | }; 242 | }; 243 | }; 244 | buildConfigurationList = 8E809EBC1887276900884B89 /* Build configuration list for PBXProject "UIForLumberjack" */; 245 | compatibilityVersion = "Xcode 3.2"; 246 | developmentRegion = English; 247 | hasScannedForEncodings = 0; 248 | knownRegions = ( 249 | en, 250 | ); 251 | mainGroup = 8E809EB81887276900884B89; 252 | productRefGroup = 8E809EC21887276900884B89 /* Products */; 253 | projectDirPath = ""; 254 | projectRoot = ""; 255 | targets = ( 256 | 8E809EC01887276900884B89 /* UIForLumberjack */, 257 | 8E809ED01887276900884B89 /* UIForLumberjackTests */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXResourcesBuildPhase section */ 263 | 8E809ECF1887276900884B89 /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 8E809EDF1887276900884B89 /* InfoPlist.strings in Resources */, 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXShellScriptBuildPhase section */ 274 | A3915936766E4F808E41EA6C /* Check Pods Manifest.lock */ = { 275 | isa = PBXShellScriptBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | inputPaths = ( 280 | ); 281 | name = "Check Pods Manifest.lock"; 282 | outputPaths = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | shellPath = /bin/sh; 286 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 287 | showEnvVarsInLog = 0; 288 | }; 289 | B1FC9F7E0F70473396255B86 /* Copy Pods Resources */ = { 290 | isa = PBXShellScriptBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | inputPaths = ( 295 | ); 296 | name = "Copy Pods Resources"; 297 | outputPaths = ( 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | shellPath = /bin/sh; 301 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UIForLumberjack/Pods-UIForLumberjack-resources.sh\"\n"; 302 | showEnvVarsInLog = 0; 303 | }; 304 | /* End PBXShellScriptBuildPhase section */ 305 | 306 | /* Begin PBXSourcesBuildPhase section */ 307 | 8E809EBD1887276900884B89 /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | 8E809ECC1887276900884B89 /* UIForLumberjack.m in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | 8E809ECD1887276900884B89 /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 8E809EE11887276900884B89 /* UIForLumberjackTests.m in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | /* End PBXSourcesBuildPhase section */ 324 | 325 | /* Begin PBXTargetDependency section */ 326 | 8E809ED81887276900884B89 /* PBXTargetDependency */ = { 327 | isa = PBXTargetDependency; 328 | target = 8E809EC01887276900884B89 /* UIForLumberjack */; 329 | targetProxy = 8E809ED71887276900884B89 /* PBXContainerItemProxy */; 330 | }; 331 | /* End PBXTargetDependency section */ 332 | 333 | /* Begin PBXVariantGroup section */ 334 | 8E809EDD1887276900884B89 /* InfoPlist.strings */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | 8E809EDE1887276900884B89 /* en */, 338 | ); 339 | name = InfoPlist.strings; 340 | sourceTree = ""; 341 | }; 342 | 8E809F1018872AE200884B89 /* InfoPlist.strings */ = { 343 | isa = PBXVariantGroup; 344 | children = ( 345 | 8E809F1118872AE200884B89 /* en */, 346 | ); 347 | name = InfoPlist.strings; 348 | sourceTree = ""; 349 | }; 350 | /* End PBXVariantGroup section */ 351 | 352 | /* Begin XCBuildConfiguration section */ 353 | 8E809EE21887276900884B89 /* Debug */ = { 354 | isa = XCBuildConfiguration; 355 | buildSettings = { 356 | ALWAYS_SEARCH_USER_PATHS = NO; 357 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 358 | CLANG_CXX_LIBRARY = "libc++"; 359 | CLANG_ENABLE_MODULES = YES; 360 | CLANG_ENABLE_OBJC_ARC = YES; 361 | CLANG_WARN_BOOL_CONVERSION = YES; 362 | CLANG_WARN_CONSTANT_CONVERSION = YES; 363 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 364 | CLANG_WARN_EMPTY_BODY = YES; 365 | CLANG_WARN_ENUM_CONVERSION = YES; 366 | CLANG_WARN_INT_CONVERSION = YES; 367 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 368 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 369 | COPY_PHASE_STRIP = NO; 370 | ENABLE_TESTABILITY = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_DYNAMIC_NO_PIC = NO; 373 | GCC_OPTIMIZATION_LEVEL = 0; 374 | GCC_PREPROCESSOR_DEFINITIONS = ( 375 | "DEBUG=1", 376 | "$(inherited)", 377 | ); 378 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 381 | GCC_WARN_UNDECLARED_SELECTOR = YES; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 383 | GCC_WARN_UNUSED_FUNCTION = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 386 | ONLY_ACTIVE_ARCH = YES; 387 | SDKROOT = iphoneos; 388 | }; 389 | name = Debug; 390 | }; 391 | 8E809EE31887276900884B89 /* Release */ = { 392 | isa = XCBuildConfiguration; 393 | buildSettings = { 394 | ALWAYS_SEARCH_USER_PATHS = NO; 395 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 396 | CLANG_CXX_LIBRARY = "libc++"; 397 | CLANG_ENABLE_MODULES = YES; 398 | CLANG_ENABLE_OBJC_ARC = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 402 | CLANG_WARN_EMPTY_BODY = YES; 403 | CLANG_WARN_ENUM_CONVERSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 406 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 407 | COPY_PHASE_STRIP = YES; 408 | ENABLE_NS_ASSERTIONS = NO; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 417 | SDKROOT = iphoneos; 418 | VALIDATE_PRODUCT = YES; 419 | }; 420 | name = Release; 421 | }; 422 | 8E809EE51887276900884B89 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | baseConfigurationReference = 0824C143D35B3C8F66986F85 /* Pods-UIForLumberjack.debug.xcconfig */; 425 | buildSettings = { 426 | DSTROOT = /tmp/UIForLumberjack.dst; 427 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 428 | GCC_PREFIX_HEADER = "UIForLumberjack/UIForLumberjack-Prefix.pch"; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | OTHER_LDFLAGS = "-ObjC"; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | SKIP_INSTALL = YES; 433 | }; 434 | name = Debug; 435 | }; 436 | 8E809EE61887276900884B89 /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | baseConfigurationReference = A87A8F4EB0D7F4FB35B729EB /* Pods-UIForLumberjack.release.xcconfig */; 439 | buildSettings = { 440 | DSTROOT = /tmp/UIForLumberjack.dst; 441 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 442 | GCC_PREFIX_HEADER = "UIForLumberjack/UIForLumberjack-Prefix.pch"; 443 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 444 | OTHER_LDFLAGS = "-ObjC"; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | SKIP_INSTALL = YES; 447 | }; 448 | name = Release; 449 | }; 450 | 8E809EE81887276900884B89 /* Debug */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIForLumberjackTestApp.app/UIForLumberjackTestApp"; 454 | FRAMEWORK_SEARCH_PATHS = ( 455 | "$(SDKROOT)/Developer/Library/Frameworks", 456 | "$(inherited)", 457 | "$(DEVELOPER_FRAMEWORKS_DIR)", 458 | ); 459 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 460 | GCC_PREFIX_HEADER = "UIForLumberjack/UIForLumberjack-Prefix.pch"; 461 | GCC_PREPROCESSOR_DEFINITIONS = ( 462 | "DEBUG=1", 463 | "$(inherited)", 464 | ); 465 | INFOPLIST_FILE = "UIForLumberjackTests/UIForLumberjackTests-Info.plist"; 466 | PRODUCT_BUNDLE_IDENTIFIER = "pl.sigmapoint.${PRODUCT_NAME:rfc1034identifier}"; 467 | PRODUCT_NAME = "$(TARGET_NAME)"; 468 | TEST_HOST = "$(BUNDLE_LOADER)"; 469 | WRAPPER_EXTENSION = xctest; 470 | }; 471 | name = Debug; 472 | }; 473 | 8E809EE91887276900884B89 /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIForLumberjackTestApp.app/UIForLumberjackTestApp"; 477 | FRAMEWORK_SEARCH_PATHS = ( 478 | "$(SDKROOT)/Developer/Library/Frameworks", 479 | "$(inherited)", 480 | "$(DEVELOPER_FRAMEWORKS_DIR)", 481 | ); 482 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 483 | GCC_PREFIX_HEADER = "UIForLumberjack/UIForLumberjack-Prefix.pch"; 484 | INFOPLIST_FILE = "UIForLumberjackTests/UIForLumberjackTests-Info.plist"; 485 | PRODUCT_BUNDLE_IDENTIFIER = "pl.sigmapoint.${PRODUCT_NAME:rfc1034identifier}"; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | TEST_HOST = "$(BUNDLE_LOADER)"; 488 | WRAPPER_EXTENSION = xctest; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 8E809EBC1887276900884B89 /* Build configuration list for PBXProject "UIForLumberjack" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 8E809EE21887276900884B89 /* Debug */, 499 | 8E809EE31887276900884B89 /* Release */, 500 | ); 501 | defaultConfigurationIsVisible = 0; 502 | defaultConfigurationName = Release; 503 | }; 504 | 8E809EE41887276900884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjack" */ = { 505 | isa = XCConfigurationList; 506 | buildConfigurations = ( 507 | 8E809EE51887276900884B89 /* Debug */, 508 | 8E809EE61887276900884B89 /* Release */, 509 | ); 510 | defaultConfigurationIsVisible = 0; 511 | defaultConfigurationName = Release; 512 | }; 513 | 8E809EE71887276900884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackTests" */ = { 514 | isa = XCConfigurationList; 515 | buildConfigurations = ( 516 | 8E809EE81887276900884B89 /* Debug */, 517 | 8E809EE91887276900884B89 /* Release */, 518 | ); 519 | defaultConfigurationIsVisible = 0; 520 | defaultConfigurationName = Release; 521 | }; 522 | /* End XCConfigurationList section */ 523 | }; 524 | rootObject = 8E809EB91887276900884B89 /* Project object */; 525 | } 526 | -------------------------------------------------------------------------------- /UIForLumberjack.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIForLumberjack.xcodeproj/xcuserdata/kamil.xcuserdatad/xcschemes/UIForLumberjack.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 62 | 63 | 64 | 65 | 71 | 72 | 74 | 75 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /UIForLumberjack.xcodeproj/xcuserdata/kamil.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIForLumberjack.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8E809EC01887276900884B89 16 | 17 | primary 18 | 19 | 20 | 8E809ED01887276900884B89 21 | 22 | primary 23 | 24 | 25 | 8E809EEF18872AE200884B89 26 | 27 | primary 28 | 29 | 30 | 8E809F0618872AE200884B89 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /UIForLumberjack.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UIForLumberjack/UIForLumberjack-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #import 10 | #endif 11 | -------------------------------------------------------------------------------- /UIForLumberjack/UIForLumberjack.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIForLumberjack.h 3 | // UIForLumberjack 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIForLumberjack : NSObject 13 | 14 | + (instancetype)sharedInstance; 15 | 16 | @property (nonatomic, readonly) UITableView *tableView; 17 | 18 | - (void)showLogInView:(UIView *)view; 19 | - (void)hideLog; 20 | - (void)clearLog; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /UIForLumberjack/UIForLumberjack.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIForLumberjack.m 3 | // UIForLumberjack 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import "UIForLumberjack.h" 10 | 11 | NSString *const LogCellReuseIdentifier = @"LogCell"; 12 | 13 | @interface UIForLumberjack () 14 | 15 | @property (nonatomic) UITableView *tableView; 16 | 17 | @property (nonatomic) NSMutableArray *messages; 18 | @property (nonatomic) NSMutableSet *messagesExpanded; 19 | @property (nonatomic) NSDateFormatter *dateFormatter; 20 | 21 | @end 22 | 23 | @implementation UIForLumberjack 24 | 25 | #pragma mark - Class Methods 26 | 27 | + (UIForLumberjack *)sharedInstance 28 | { 29 | static UIForLumberjack *sharedInstance; 30 | static dispatch_once_t onceToken; 31 | dispatch_once(&onceToken, ^{ 32 | sharedInstance = [[UIForLumberjack alloc] init]; 33 | }); 34 | return sharedInstance; 35 | } 36 | 37 | #pragma mark - Initialization 38 | 39 | - (instancetype)init; 40 | { 41 | self = [super init]; 42 | if (!self) { 43 | return nil; 44 | } 45 | 46 | self.messages = [NSMutableArray array]; 47 | self.messagesExpanded = [NSMutableSet set]; 48 | 49 | self.tableView = [[UITableView alloc] init]; 50 | self.tableView.delegate = self; 51 | self.tableView.dataSource = self; 52 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:LogCellReuseIdentifier]; 53 | self.tableView.backgroundColor = [UIColor blackColor]; 54 | self.tableView.alpha = 0.8f; 55 | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 56 | 57 | self.dateFormatter = [[NSDateFormatter alloc] init]; 58 | [self.dateFormatter setDateFormat:@"HH:mm:ss:SSS"]; 59 | 60 | return self; 61 | } 62 | 63 | #pragma mark - DDLogger 64 | 65 | @synthesize logFormatter; 66 | 67 | - (void)logMessage:(DDLogMessage *)logMessage 68 | { 69 | dispatch_async(dispatch_get_main_queue(), ^{ 70 | [_messages addObject:logMessage]; 71 | 72 | if (_tableView.superview == nil) { return; } 73 | 74 | BOOL scroll = NO; 75 | if(_tableView.contentOffset.y + _tableView.bounds.size.height >= _tableView.contentSize.height) 76 | scroll = YES; 77 | 78 | 79 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:_messages.count-1 inSection:0]; 80 | [_tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationBottom]; 81 | 82 | if(scroll) { 83 | [_tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; 84 | } 85 | }); 86 | } 87 | 88 | #pragma mark - UITableViewDataSource 89 | 90 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 91 | { 92 | return _messages.count; 93 | } 94 | 95 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 96 | { 97 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:LogCellReuseIdentifier forIndexPath:indexPath]; 98 | [self configureCell:cell forRowAtIndexPath:indexPath]; 99 | return cell; 100 | } 101 | 102 | #pragma mark - UITableViewDelegate 103 | 104 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 105 | { 106 | NSString *messageText = [self textOfMessageForIndexPath:indexPath]; 107 | 108 | CGFloat const messageMargin = 10.0; 109 | 110 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0 111 | return [messageText sizeWithFont:[self fontOfMessage] constrainedToSize:CGSizeMake(self.tableView.bounds.size.width - 30, FLT_MAX)].height + messageMargin; 112 | #else 113 | return ceil([messageText boundingRectWithSize:CGSizeMake(self.tableView.bounds.size.width - 30, FLT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[self fontOfMessage]} context:nil].size.height + messageMargin); 114 | #endif 115 | } 116 | 117 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 118 | { 119 | return 44; 120 | } 121 | 122 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 123 | { 124 | UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; 125 | [closeButton setTitle:@"Hide Log" forState:UIControlStateNormal]; 126 | closeButton.backgroundColor = [UIColor colorWithRed:59/255.0 green:209/255.0 blue:65/255.0 alpha:1]; 127 | [closeButton addTarget:self action:@selector(hideLog) forControlEvents:UIControlEventTouchUpInside]; 128 | return closeButton; 129 | } 130 | 131 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 132 | { 133 | NSNumber *index = @(indexPath.row); 134 | if ([_messagesExpanded containsObject:index]) { 135 | [_messagesExpanded removeObject:index]; 136 | } else { 137 | [_messagesExpanded addObject:index]; 138 | } 139 | [tableView deselectRowAtIndexPath:indexPath animated:NO]; 140 | [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 141 | } 142 | 143 | #pragma mark - Private Methods 144 | 145 | - (void)configureCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 146 | { 147 | DDLogMessage *message = _messages[indexPath.row]; 148 | 149 | switch (message.flag) { 150 | case DDLogFlagError: 151 | cell.textLabel.textColor = [UIColor redColor]; 152 | break; 153 | 154 | case DDLogFlagWarning: 155 | cell.textLabel.textColor = [UIColor orangeColor]; 156 | break; 157 | 158 | case DDLogFlagDebug: 159 | cell.textLabel.textColor = [UIColor greenColor]; 160 | break; 161 | 162 | case DDLogFlagVerbose: 163 | cell.textLabel.textColor = [UIColor blueColor]; 164 | break; 165 | 166 | default: 167 | cell.textLabel.textColor = [UIColor whiteColor]; 168 | break; 169 | } 170 | 171 | cell.textLabel.text = [self textOfMessageForIndexPath:indexPath]; 172 | cell.textLabel.font = [self fontOfMessage]; 173 | cell.textLabel.numberOfLines = 0; 174 | cell.backgroundColor = [UIColor clearColor]; 175 | } 176 | 177 | - (NSString *)textOfMessageForIndexPath:(NSIndexPath *)indexPath 178 | { 179 | DDLogMessage *message = _messages[indexPath.row]; 180 | if ([_messagesExpanded containsObject:@(indexPath.row)]) { 181 | return [NSString stringWithFormat:@"[%@] %@:%lu [%@]", [_dateFormatter stringFromDate:message.timestamp], message.file, (unsigned long)message.line, message.function]; 182 | } else { 183 | return [NSString stringWithFormat:@"[%@] %@", [_dateFormatter stringFromDate:message.timestamp], message.message]; 184 | } 185 | } 186 | 187 | - (UIFont *)fontOfMessage 188 | { 189 | return [UIFont boldSystemFontOfSize:9]; 190 | } 191 | 192 | #pragma mark - Public Methods 193 | 194 | - (void)showLogInView:(UIView*)view 195 | { 196 | [view addSubview:self.tableView]; 197 | UITableView *tv = self.tableView; 198 | tv.translatesAutoresizingMaskIntoConstraints = NO; 199 | [view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[tv]|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(tv)]]; 200 | [view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[tv]|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(tv)]]; 201 | } 202 | 203 | - (void)hideLog 204 | { 205 | [self.tableView removeFromSuperview]; 206 | } 207 | 208 | - (void)clearLog 209 | { 210 | [_messages removeAllObjects]; 211 | [_messagesExpanded removeAllObjects]; 212 | [self.tableView reloadData]; 213 | } 214 | 215 | @end 216 | -------------------------------------------------------------------------------- /UIForLumberjackExample/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | 3 | target 'UIForLumberjackExample' do 4 | pod 'UIForLumberjack', :path => '../' 5 | pod 'CocoaLumberjack' 6 | end 7 | -------------------------------------------------------------------------------- /UIForLumberjackExample/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaLumberjack (2.4.0): 3 | - CocoaLumberjack/Default (= 2.4.0) 4 | - CocoaLumberjack/Extensions (= 2.4.0) 5 | - CocoaLumberjack/Core (2.4.0) 6 | - CocoaLumberjack/Default (2.4.0): 7 | - CocoaLumberjack/Core 8 | - CocoaLumberjack/Extensions (2.4.0): 9 | - CocoaLumberjack/Default 10 | - UIForLumberjack (1.0.3): 11 | - CocoaLumberjack (~> 2.0) 12 | 13 | DEPENDENCIES: 14 | - CocoaLumberjack 15 | - UIForLumberjack (from `../`) 16 | 17 | EXTERNAL SOURCES: 18 | UIForLumberjack: 19 | :path: ../ 20 | 21 | SPEC CHECKSUMS: 22 | CocoaLumberjack: aa9dcab71bdf9eaf2a63bbd9ddc87863efe45457 23 | UIForLumberjack: bea973b5a84fe7d3cb56730b271ed1b309428b19 24 | 25 | PODFILE CHECKSUM: f56845a350116ea5aa99e6ae3d0174fe49da53e1 26 | 27 | COCOAPODS: 1.4.0 28 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7D24B168A98AF0A6C47836F3 /* libPods-UIForLumberjackExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 37CE0B7FF2F5F52F5976DE22 /* libPods-UIForLumberjackExample.a */; }; 11 | 8E809F291887404600884B89 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F281887404600884B89 /* Foundation.framework */; }; 12 | 8E809F2B1887404600884B89 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F2A1887404600884B89 /* CoreGraphics.framework */; }; 13 | 8E809F2D1887404600884B89 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F2C1887404600884B89 /* UIKit.framework */; }; 14 | 8E809F331887404600884B89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8E809F311887404600884B89 /* InfoPlist.strings */; }; 15 | 8E809F351887404600884B89 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809F341887404600884B89 /* main.m */; }; 16 | 8E809F391887404600884B89 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809F381887404600884B89 /* AppDelegate.m */; }; 17 | 8E809F3C1887404600884B89 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E809F3A1887404600884B89 /* Main_iPhone.storyboard */; }; 18 | 8E809F421887404600884B89 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809F411887404600884B89 /* FirstViewController.m */; }; 19 | 8E809F451887404600884B89 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809F441887404600884B89 /* SecondViewController.m */; }; 20 | 8E809F471887404600884B89 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E809F461887404600884B89 /* Images.xcassets */; }; 21 | 8E809F4E1887404600884B89 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F4D1887404600884B89 /* XCTest.framework */; }; 22 | 8E809F4F1887404600884B89 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F281887404600884B89 /* Foundation.framework */; }; 23 | 8E809F501887404600884B89 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E809F2C1887404600884B89 /* UIKit.framework */; }; 24 | 8E809F581887404700884B89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8E809F561887404700884B89 /* InfoPlist.strings */; }; 25 | 8E809F5A1887404700884B89 /* UIForLumberjackExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E809F591887404700884B89 /* UIForLumberjackExampleTests.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 8E809F511887404600884B89 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 8E809F1D1887404600884B89 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 8E809F241887404600884B89; 34 | remoteInfo = UIForLumberjackExample; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 37CE0B7FF2F5F52F5976DE22 /* libPods-UIForLumberjackExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-UIForLumberjackExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 8E809F251887404600884B89 /* UIForLumberjackExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIForLumberjackExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 8E809F281887404600884B89 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 | 8E809F2A1887404600884B89 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 43 | 8E809F2C1887404600884B89 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 44 | 8E809F301887404600884B89 /* UIForLumberjackExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIForLumberjackExample-Info.plist"; sourceTree = ""; }; 45 | 8E809F321887404600884B89 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 46 | 8E809F341887404600884B89 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 8E809F361887404600884B89 /* UIForLumberjackExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIForLumberjackExample-Prefix.pch"; sourceTree = ""; }; 48 | 8E809F371887404600884B89 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 8E809F381887404600884B89 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 8E809F3B1887404600884B89 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; 51 | 8E809F401887404600884B89 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; 52 | 8E809F411887404600884B89 /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; 53 | 8E809F431887404600884B89 /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; 54 | 8E809F441887404600884B89 /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; 55 | 8E809F461887404600884B89 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | 8E809F4C1887404600884B89 /* UIForLumberjackExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIForLumberjackExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 8E809F4D1887404600884B89 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 58 | 8E809F551887404700884B89 /* UIForLumberjackExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIForLumberjackExampleTests-Info.plist"; sourceTree = ""; }; 59 | 8E809F571887404700884B89 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | 8E809F591887404700884B89 /* UIForLumberjackExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIForLumberjackExampleTests.m; sourceTree = ""; }; 61 | DB2E03A9ADE4CBD24796D763 /* Pods-UIForLumberjackExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UIForLumberjackExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-UIForLumberjackExample/Pods-UIForLumberjackExample.release.xcconfig"; sourceTree = ""; }; 62 | EBB971A902B0EECD5BCEF78D /* Pods-UIForLumberjackExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UIForLumberjackExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-UIForLumberjackExample/Pods-UIForLumberjackExample.debug.xcconfig"; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 8E809F221887404600884B89 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 8E809F2B1887404600884B89 /* CoreGraphics.framework in Frameworks */, 71 | 8E809F2D1887404600884B89 /* UIKit.framework in Frameworks */, 72 | 8E809F291887404600884B89 /* Foundation.framework in Frameworks */, 73 | 7D24B168A98AF0A6C47836F3 /* libPods-UIForLumberjackExample.a in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | 8E809F491887404600884B89 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 8E809F4E1887404600884B89 /* XCTest.framework in Frameworks */, 82 | 8E809F501887404600884B89 /* UIKit.framework in Frameworks */, 83 | 8E809F4F1887404600884B89 /* Foundation.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 35035F49A4F81B3741200ED7 /* Pods */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | EBB971A902B0EECD5BCEF78D /* Pods-UIForLumberjackExample.debug.xcconfig */, 94 | DB2E03A9ADE4CBD24796D763 /* Pods-UIForLumberjackExample.release.xcconfig */, 95 | ); 96 | name = Pods; 97 | sourceTree = ""; 98 | }; 99 | 8E809F1C1887404600884B89 = { 100 | isa = PBXGroup; 101 | children = ( 102 | 8E809F2E1887404600884B89 /* UIForLumberjackExample */, 103 | 8E809F531887404600884B89 /* UIForLumberjackExampleTests */, 104 | 8E809F271887404600884B89 /* Frameworks */, 105 | 8E809F261887404600884B89 /* Products */, 106 | 35035F49A4F81B3741200ED7 /* Pods */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 8E809F261887404600884B89 /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 8E809F251887404600884B89 /* UIForLumberjackExample.app */, 114 | 8E809F4C1887404600884B89 /* UIForLumberjackExampleTests.xctest */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 8E809F271887404600884B89 /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 8E809F281887404600884B89 /* Foundation.framework */, 123 | 8E809F2A1887404600884B89 /* CoreGraphics.framework */, 124 | 8E809F2C1887404600884B89 /* UIKit.framework */, 125 | 8E809F4D1887404600884B89 /* XCTest.framework */, 126 | 37CE0B7FF2F5F52F5976DE22 /* libPods-UIForLumberjackExample.a */, 127 | ); 128 | name = Frameworks; 129 | sourceTree = ""; 130 | }; 131 | 8E809F2E1887404600884B89 /* UIForLumberjackExample */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 8E809F371887404600884B89 /* AppDelegate.h */, 135 | 8E809F381887404600884B89 /* AppDelegate.m */, 136 | 8E809F3A1887404600884B89 /* Main_iPhone.storyboard */, 137 | 8E809F401887404600884B89 /* FirstViewController.h */, 138 | 8E809F411887404600884B89 /* FirstViewController.m */, 139 | 8E809F431887404600884B89 /* SecondViewController.h */, 140 | 8E809F441887404600884B89 /* SecondViewController.m */, 141 | 8E809F461887404600884B89 /* Images.xcassets */, 142 | 8E809F2F1887404600884B89 /* Supporting Files */, 143 | ); 144 | path = UIForLumberjackExample; 145 | sourceTree = ""; 146 | }; 147 | 8E809F2F1887404600884B89 /* Supporting Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 8E809F301887404600884B89 /* UIForLumberjackExample-Info.plist */, 151 | 8E809F311887404600884B89 /* InfoPlist.strings */, 152 | 8E809F341887404600884B89 /* main.m */, 153 | 8E809F361887404600884B89 /* UIForLumberjackExample-Prefix.pch */, 154 | ); 155 | name = "Supporting Files"; 156 | sourceTree = ""; 157 | }; 158 | 8E809F531887404600884B89 /* UIForLumberjackExampleTests */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 8E809F591887404700884B89 /* UIForLumberjackExampleTests.m */, 162 | 8E809F541887404700884B89 /* Supporting Files */, 163 | ); 164 | path = UIForLumberjackExampleTests; 165 | sourceTree = ""; 166 | }; 167 | 8E809F541887404700884B89 /* Supporting Files */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 8E809F551887404700884B89 /* UIForLumberjackExampleTests-Info.plist */, 171 | 8E809F561887404700884B89 /* InfoPlist.strings */, 172 | ); 173 | name = "Supporting Files"; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXNativeTarget section */ 179 | 8E809F241887404600884B89 /* UIForLumberjackExample */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = 8E809F5D1887404700884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackExample" */; 182 | buildPhases = ( 183 | A5348D4E288022D4450D0FF0 /* [CP] Check Pods Manifest.lock */, 184 | 8E809F211887404600884B89 /* Sources */, 185 | 8E809F221887404600884B89 /* Frameworks */, 186 | 8E809F231887404600884B89 /* Resources */, 187 | 3EB6B4563E897104A561B9EA /* [CP] Embed Pods Frameworks */, 188 | B7199822C71E8EF0EA653350 /* [CP] Copy Pods Resources */, 189 | ); 190 | buildRules = ( 191 | ); 192 | dependencies = ( 193 | ); 194 | name = UIForLumberjackExample; 195 | productName = UIForLumberjackExample; 196 | productReference = 8E809F251887404600884B89 /* UIForLumberjackExample.app */; 197 | productType = "com.apple.product-type.application"; 198 | }; 199 | 8E809F4B1887404600884B89 /* UIForLumberjackExampleTests */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 8E809F601887404700884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackExampleTests" */; 202 | buildPhases = ( 203 | 8E809F481887404600884B89 /* Sources */, 204 | 8E809F491887404600884B89 /* Frameworks */, 205 | 8E809F4A1887404600884B89 /* Resources */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | 8E809F521887404600884B89 /* PBXTargetDependency */, 211 | ); 212 | name = UIForLumberjackExampleTests; 213 | productName = UIForLumberjackExampleTests; 214 | productReference = 8E809F4C1887404600884B89 /* UIForLumberjackExampleTests.xctest */; 215 | productType = "com.apple.product-type.bundle.unit-test"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | 8E809F1D1887404600884B89 /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | LastUpgradeCheck = 0510; 224 | ORGANIZATIONNAME = Sigmapoint; 225 | TargetAttributes = { 226 | 8E809F4B1887404600884B89 = { 227 | TestTargetID = 8E809F241887404600884B89; 228 | }; 229 | }; 230 | }; 231 | buildConfigurationList = 8E809F201887404600884B89 /* Build configuration list for PBXProject "UIForLumberjackExample" */; 232 | compatibilityVersion = "Xcode 3.2"; 233 | developmentRegion = English; 234 | hasScannedForEncodings = 0; 235 | knownRegions = ( 236 | en, 237 | Base, 238 | ); 239 | mainGroup = 8E809F1C1887404600884B89; 240 | productRefGroup = 8E809F261887404600884B89 /* Products */; 241 | projectDirPath = ""; 242 | projectRoot = ""; 243 | targets = ( 244 | 8E809F241887404600884B89 /* UIForLumberjackExample */, 245 | 8E809F4B1887404600884B89 /* UIForLumberjackExampleTests */, 246 | ); 247 | }; 248 | /* End PBXProject section */ 249 | 250 | /* Begin PBXResourcesBuildPhase section */ 251 | 8E809F231887404600884B89 /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | 8E809F471887404600884B89 /* Images.xcassets in Resources */, 256 | 8E809F3C1887404600884B89 /* Main_iPhone.storyboard in Resources */, 257 | 8E809F331887404600884B89 /* InfoPlist.strings in Resources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | 8E809F4A1887404600884B89 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 8E809F581887404700884B89 /* InfoPlist.strings in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXResourcesBuildPhase section */ 270 | 271 | /* Begin PBXShellScriptBuildPhase section */ 272 | 3EB6B4563E897104A561B9EA /* [CP] Embed Pods Frameworks */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputPaths = ( 278 | ); 279 | name = "[CP] Embed Pods Frameworks"; 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UIForLumberjackExample/Pods-UIForLumberjackExample-frameworks.sh\"\n"; 285 | showEnvVarsInLog = 0; 286 | }; 287 | A5348D4E288022D4450D0FF0 /* [CP] Check Pods Manifest.lock */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputPaths = ( 293 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 294 | "${PODS_ROOT}/Manifest.lock", 295 | ); 296 | name = "[CP] Check Pods Manifest.lock"; 297 | outputPaths = ( 298 | "$(DERIVED_FILE_DIR)/Pods-UIForLumberjackExample-checkManifestLockResult.txt", 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | shellPath = /bin/sh; 302 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 303 | showEnvVarsInLog = 0; 304 | }; 305 | B7199822C71E8EF0EA653350 /* [CP] Copy Pods Resources */ = { 306 | isa = PBXShellScriptBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | inputPaths = ( 311 | ); 312 | name = "[CP] Copy Pods Resources"; 313 | outputPaths = ( 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | shellPath = /bin/sh; 317 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UIForLumberjackExample/Pods-UIForLumberjackExample-resources.sh\"\n"; 318 | showEnvVarsInLog = 0; 319 | }; 320 | /* End PBXShellScriptBuildPhase section */ 321 | 322 | /* Begin PBXSourcesBuildPhase section */ 323 | 8E809F211887404600884B89 /* Sources */ = { 324 | isa = PBXSourcesBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | 8E809F451887404600884B89 /* SecondViewController.m in Sources */, 328 | 8E809F391887404600884B89 /* AppDelegate.m in Sources */, 329 | 8E809F421887404600884B89 /* FirstViewController.m in Sources */, 330 | 8E809F351887404600884B89 /* main.m in Sources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | 8E809F481887404600884B89 /* Sources */ = { 335 | isa = PBXSourcesBuildPhase; 336 | buildActionMask = 2147483647; 337 | files = ( 338 | 8E809F5A1887404700884B89 /* UIForLumberjackExampleTests.m in Sources */, 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | /* End PBXSourcesBuildPhase section */ 343 | 344 | /* Begin PBXTargetDependency section */ 345 | 8E809F521887404600884B89 /* PBXTargetDependency */ = { 346 | isa = PBXTargetDependency; 347 | target = 8E809F241887404600884B89 /* UIForLumberjackExample */; 348 | targetProxy = 8E809F511887404600884B89 /* PBXContainerItemProxy */; 349 | }; 350 | /* End PBXTargetDependency section */ 351 | 352 | /* Begin PBXVariantGroup section */ 353 | 8E809F311887404600884B89 /* InfoPlist.strings */ = { 354 | isa = PBXVariantGroup; 355 | children = ( 356 | 8E809F321887404600884B89 /* en */, 357 | ); 358 | name = InfoPlist.strings; 359 | sourceTree = ""; 360 | }; 361 | 8E809F3A1887404600884B89 /* Main_iPhone.storyboard */ = { 362 | isa = PBXVariantGroup; 363 | children = ( 364 | 8E809F3B1887404600884B89 /* Base */, 365 | ); 366 | name = Main_iPhone.storyboard; 367 | sourceTree = ""; 368 | }; 369 | 8E809F561887404700884B89 /* InfoPlist.strings */ = { 370 | isa = PBXVariantGroup; 371 | children = ( 372 | 8E809F571887404700884B89 /* en */, 373 | ); 374 | name = InfoPlist.strings; 375 | sourceTree = ""; 376 | }; 377 | /* End PBXVariantGroup section */ 378 | 379 | /* Begin XCBuildConfiguration section */ 380 | 8E809F5B1887404700884B89 /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 385 | CLANG_CXX_LIBRARY = "libc++"; 386 | CLANG_ENABLE_MODULES = YES; 387 | CLANG_ENABLE_OBJC_ARC = YES; 388 | CLANG_WARN_BOOL_CONVERSION = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | COPY_PHASE_STRIP = NO; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_DYNAMIC_NO_PIC = NO; 400 | GCC_OPTIMIZATION_LEVEL = 0; 401 | GCC_PREPROCESSOR_DEFINITIONS = ( 402 | "DEBUG=1", 403 | "$(inherited)", 404 | ); 405 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 413 | ONLY_ACTIVE_ARCH = YES; 414 | SDKROOT = iphoneos; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | }; 417 | name = Debug; 418 | }; 419 | 8E809F5C1887404700884B89 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ALWAYS_SEARCH_USER_PATHS = NO; 423 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 424 | CLANG_CXX_LIBRARY = "libc++"; 425 | CLANG_ENABLE_MODULES = YES; 426 | CLANG_ENABLE_OBJC_ARC = YES; 427 | CLANG_WARN_BOOL_CONVERSION = YES; 428 | CLANG_WARN_CONSTANT_CONVERSION = YES; 429 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 430 | CLANG_WARN_EMPTY_BODY = YES; 431 | CLANG_WARN_ENUM_CONVERSION = YES; 432 | CLANG_WARN_INT_CONVERSION = YES; 433 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 434 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 435 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 436 | COPY_PHASE_STRIP = YES; 437 | ENABLE_NS_ASSERTIONS = NO; 438 | GCC_C_LANGUAGE_STANDARD = gnu99; 439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 441 | GCC_WARN_UNDECLARED_SELECTOR = YES; 442 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 443 | GCC_WARN_UNUSED_FUNCTION = YES; 444 | GCC_WARN_UNUSED_VARIABLE = YES; 445 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 446 | SDKROOT = iphoneos; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | VALIDATE_PRODUCT = YES; 449 | }; 450 | name = Release; 451 | }; 452 | 8E809F5E1887404700884B89 /* Debug */ = { 453 | isa = XCBuildConfiguration; 454 | baseConfigurationReference = EBB971A902B0EECD5BCEF78D /* Pods-UIForLumberjackExample.debug.xcconfig */; 455 | buildSettings = { 456 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 457 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 458 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 459 | GCC_PREFIX_HEADER = "UIForLumberjackExample/UIForLumberjackExample-Prefix.pch"; 460 | INFOPLIST_FILE = "UIForLumberjackExample/UIForLumberjackExample-Info.plist"; 461 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 462 | PRODUCT_NAME = "$(TARGET_NAME)"; 463 | WRAPPER_EXTENSION = app; 464 | }; 465 | name = Debug; 466 | }; 467 | 8E809F5F1887404700884B89 /* Release */ = { 468 | isa = XCBuildConfiguration; 469 | baseConfigurationReference = DB2E03A9ADE4CBD24796D763 /* Pods-UIForLumberjackExample.release.xcconfig */; 470 | buildSettings = { 471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 472 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 473 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 474 | GCC_PREFIX_HEADER = "UIForLumberjackExample/UIForLumberjackExample-Prefix.pch"; 475 | INFOPLIST_FILE = "UIForLumberjackExample/UIForLumberjackExample-Info.plist"; 476 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | WRAPPER_EXTENSION = app; 479 | }; 480 | name = Release; 481 | }; 482 | 8E809F611887404700884B89 /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIForLumberjackExample.app/UIForLumberjackExample"; 486 | FRAMEWORK_SEARCH_PATHS = ( 487 | "$(SDKROOT)/Developer/Library/Frameworks", 488 | "$(inherited)", 489 | "$(DEVELOPER_FRAMEWORKS_DIR)", 490 | ); 491 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 492 | GCC_PREFIX_HEADER = "UIForLumberjackExample/UIForLumberjackExample-Prefix.pch"; 493 | GCC_PREPROCESSOR_DEFINITIONS = ( 494 | "DEBUG=1", 495 | "$(inherited)", 496 | ); 497 | INFOPLIST_FILE = "UIForLumberjackExampleTests/UIForLumberjackExampleTests-Info.plist"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | TEST_HOST = "$(BUNDLE_LOADER)"; 500 | WRAPPER_EXTENSION = xctest; 501 | }; 502 | name = Debug; 503 | }; 504 | 8E809F621887404700884B89 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIForLumberjackExample.app/UIForLumberjackExample"; 508 | FRAMEWORK_SEARCH_PATHS = ( 509 | "$(SDKROOT)/Developer/Library/Frameworks", 510 | "$(inherited)", 511 | "$(DEVELOPER_FRAMEWORKS_DIR)", 512 | ); 513 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 514 | GCC_PREFIX_HEADER = "UIForLumberjackExample/UIForLumberjackExample-Prefix.pch"; 515 | INFOPLIST_FILE = "UIForLumberjackExampleTests/UIForLumberjackExampleTests-Info.plist"; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUNDLE_LOADER)"; 518 | WRAPPER_EXTENSION = xctest; 519 | }; 520 | name = Release; 521 | }; 522 | /* End XCBuildConfiguration section */ 523 | 524 | /* Begin XCConfigurationList section */ 525 | 8E809F201887404600884B89 /* Build configuration list for PBXProject "UIForLumberjackExample" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 8E809F5B1887404700884B89 /* Debug */, 529 | 8E809F5C1887404700884B89 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | 8E809F5D1887404700884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackExample" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | 8E809F5E1887404700884B89 /* Debug */, 538 | 8E809F5F1887404700884B89 /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | 8E809F601887404700884B89 /* Build configuration list for PBXNativeTarget "UIForLumberjackExampleTests" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | 8E809F611887404700884B89 /* Debug */, 547 | 8E809F621887404700884B89 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | /* End XCConfigurationList section */ 553 | }; 554 | rootObject = 8E809F1D1887404600884B89 /* Project object */; 555 | } 556 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample.xcodeproj/xcuserdata/kamil.xcuserdatad/xcschemes/UIForLumberjackExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample.xcodeproj/xcuserdata/kamil.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIForLumberjackExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8E809F241887404600884B89 16 | 17 | primary 18 | 19 | 20 | 8E809F4B1887404600884B89 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "DDLog.h" 12 | #import "DDASLLogger.h" 13 | #import "DDTTYLogger.h" 14 | 15 | #import "UIForLumberjack.h" 16 | 17 | int ddLogLevel = LOG_LEVEL_VERBOSE; 18 | 19 | @implementation AppDelegate 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | [self initializeLoggers]; 24 | 25 | return YES; 26 | } 27 | 28 | - (void) initializeLoggers { 29 | [DDLog addLogger:[DDASLLogger sharedInstance]]; 30 | [DDLog addLogger:[DDTTYLogger sharedInstance]]; 31 | [[DDTTYLogger sharedInstance] setColorsEnabled:YES]; 32 | [[DDTTYLogger sharedInstance] setForegroundColor:[UIColor blueColor] backgroundColor:nil forFlag:LOG_FLAG_VERBOSE]; 33 | 34 | [DDLog addLogger:[UIForLumberjack sharedInstance]]; 35 | 36 | DDLogInfo(@"All loggers added successfully"); 37 | } 38 | 39 | - (void)applicationWillResignActive:(UIApplication *)application 40 | { 41 | // 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. 42 | // 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. 43 | } 44 | 45 | - (void)applicationDidEnterBackground:(UIApplication *)application 46 | { 47 | // 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. 48 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 49 | } 50 | 51 | - (void)applicationWillEnterForeground:(UIApplication *)application 52 | { 53 | // 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. 54 | } 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application 57 | { 58 | // 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. 59 | } 60 | 61 | - (void)applicationWillTerminate:(UIApplication *)application 62 | { 63 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Base.lproj/Main_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 100 | 110 | 120 | 130 | 140 | 151 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/FirstViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.h 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FirstViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/FirstViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.m 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import "FirstViewController.h" 10 | #import "UIForLumberjack.h" 11 | 12 | @interface FirstViewController () 13 | 14 | @end 15 | 16 | @implementation FirstViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning 25 | { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | - (IBAction)infoButtonPushed:(UIButton *)sender { 31 | [[UIForLumberjack sharedInstance] showLogInView:self.view]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/first.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "first.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "first@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/first.imageset/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/first.imageset/first.png -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/first.imageset/first@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/first.imageset/first@2x.png -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/second.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "second.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "second@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/second.imageset/second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/second.imageset/second.png -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/second.imageset/second@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/UIForLumberjackExample/Images.xcassets/second.imageset/second@2x.png -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/SecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.h 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SecondViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/SecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.m 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import "SecondViewController.h" 10 | #import "UIForLumberjack.h" 11 | 12 | @interface SecondViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIView *logView; 15 | 16 | @end 17 | 18 | @implementation SecondViewController 19 | 20 | - (void)viewDidLoad 21 | { 22 | [super viewDidLoad]; 23 | [[UIForLumberjack sharedInstance] showLogInView:_logView]; 24 | } 25 | 26 | - (IBAction)showLog:(id)sender { 27 | [[UIForLumberjack sharedInstance] showLogInView:_logView]; 28 | } 29 | 30 | - (IBAction)addDebugLog:(id)sender { 31 | DDLogDebug(@"Debug log"); 32 | } 33 | 34 | - (IBAction)addInfoLog:(id)sender { 35 | DDLogInfo(@"Info log"); 36 | 37 | DDLogInfo(@"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."); 38 | } 39 | 40 | - (IBAction)addVerboseLog:(id)sender { 41 | DDLogVerbose(@"Verbose log"); 42 | } 43 | 44 | - (IBAction)addWarningLog:(id)sender { 45 | DDLogWarn(@"Warning Log"); 46 | } 47 | 48 | - (IBAction)addErrorLog:(id)sender { 49 | DDLogError(@"Error log"); 50 | } 51 | 52 | - (IBAction)fireAsyncLoop:(id)sender { 53 | for (int i=0; i<10; ++i) { 54 | double delayInSeconds = i/2.0f; 55 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 56 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 57 | DDLogDebug(@"Async log no %d", i); 58 | }); 59 | } 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/UIForLumberjackExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | pl.sigmapoint.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UIStatusBarTintParameters 36 | 37 | UINavigationBar 38 | 39 | Style 40 | UIBarStyleDefault 41 | Translucent 42 | 43 | 44 | 45 | UISupportedInterfaceOrientations 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UISupportedInterfaceOrientations~ipad 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationPortraitUpsideDown 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/UIForLumberjackExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | 17 | extern int ddLogLevel; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIForLumberjackExample 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExampleTests/UIForLumberjackExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | pl.sigmapoint.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExampleTests/UIForLumberjackExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIForLumberjackExampleTests.m 3 | // UIForLumberjackExampleTests 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIForLumberjackExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation UIForLumberjackExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UIForLumberjackExample/UIForLumberjackExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /UIForLumberjackExample/github-assets/UIForLumberjack-full-selectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/github-assets/UIForLumberjack-full-selectors.png -------------------------------------------------------------------------------- /UIForLumberjackExample/github-assets/UIForLumberjack-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/github-assets/UIForLumberjack-full.png -------------------------------------------------------------------------------- /UIForLumberjackExample/github-assets/UIForLumberjack-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burczyk/UIForLumberjack/58e7551e327dfaf92409dfb968ad9a6ecb0089dc/UIForLumberjackExample/github-assets/UIForLumberjack-small.png -------------------------------------------------------------------------------- /UIForLumberjackTests/UIForLumberjackTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIForLumberjackTests/UIForLumberjackTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIForLumberjackTests.m 3 | // UIForLumberjackTests 4 | // 5 | // Created by Kamil Burczyk on 15.01.2014. 6 | // Copyright (c) 2014 Sigmapoint. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIForLumberjackTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation UIForLumberjackTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UIForLumberjackTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------