Skip to content

Commit b0551e9

Browse files
authored
Merge pull request #1 from mitchtreece/dev
1.0.0 Release
2 parents d5a341c + 2b21f49 commit b0551e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2646
-865
lines changed

Assets/Banner.afphoto

1.26 MB
Binary file not shown.

Assets/Banner.png

116 KB
Loading

Assets/Icon.afphoto

582 KB
Binary file not shown.

Assets/Icon.png

63.3 KB
Loading

Assets/Logo.afphoto

588 KB
Binary file not shown.

Assets/Logo.png

72.2 KB
Loading

Assets/Package.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// swift-tools-version:5.5
2+
3+
import PackageDescription
4+
5+
let package = Package()

Demo/Demo.xcodeproj/project.pbxproj

Lines changed: 109 additions & 102 deletions
Large diffs are not rendered by default.

Demo/Demo/AppDelegate.swift

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,40 @@ import Lumberjack
1010

1111
@main
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
13-
13+
1414
func application(_ application: UIApplication,
1515
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1616

17-
// Override point for customization after application launch.
17+
// Lumberjack
18+
19+
Lumberjack.buildAndRegister(loggerWithId: "custom") { logger in
20+
21+
logger.symbol = .just("📱")
22+
logger.category = "Custom"
23+
logger.hooks = [CustomHook()]
24+
25+
}
26+
27+
// Appearance
28+
29+
let appearance = UINavigationBarAppearance()
30+
appearance.configureWithOpaqueBackground()
31+
32+
UINavigationBar
33+
.appearance()
34+
.standardAppearance = appearance
35+
36+
UINavigationBar
37+
.appearance()
38+
.scrollEdgeAppearance = appearance
39+
40+
UINavigationBar
41+
.appearance()
42+
.compactAppearance = appearance
43+
44+
// Done
45+
46+
DEBUG("Hello, world!")
1847

1948
return true
2049

Demo/Demo/CustomHook.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// CustomHook.swift
3+
// Demo
4+
//
5+
// Created by Mitch Treece on 6/29/23.
6+
//
7+
8+
import Lumberjack
9+
10+
struct CustomHook: MessageHook {
11+
12+
func hook(_ message: Message) -> MessageHookResult {
13+
14+
if ((0...10).randomElement() ?? 0) == 10 {
15+
print("🎲 [LUCKY] Custom hook says: \"you feelin lucky punk?\" 🤠")
16+
}
17+
18+
return .next
19+
20+
}
21+
22+
}

Demo/Demo/Resources/Assets.xcassets/AccentColor.colorset/Contents.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
22
"colors" : [
33
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xB1",
9+
"green" : "0xE8",
10+
"red" : "0xFF"
11+
}
12+
},
413
"idiom" : "universal"
514
}
615
],

Demo/Demo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"images" : [
33
{
4+
"filename" : "Icon.png",
45
"idiom" : "universal",
56
"platform" : "ios",
67
"size" : "1024x1024"
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "universal",
9+
"scale" : "2x"
10+
},
11+
{
12+
"filename" : "Logo.png",
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
Loading
Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22113.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22089.1"/>
7+
<capability name="Named colors" minToolsVersion="9.0"/>
58
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
69
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
710
</dependencies>
@@ -11,15 +14,34 @@
1114
<objects>
1215
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
1316
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
17+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1518
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
19+
<subviews>
20+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="Ukk-TV-QJ8">
21+
<rect key="frame" x="121.66666666666669" y="351" width="150" height="150"/>
22+
<constraints>
23+
<constraint firstAttribute="width" constant="150" id="78N-ks-SfX"/>
24+
<constraint firstAttribute="height" constant="150" id="kMR-v3-WFW"/>
25+
</constraints>
26+
</imageView>
27+
</subviews>
1728
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
29+
<color key="backgroundColor" name="AccentColor"/>
30+
<constraints>
31+
<constraint firstItem="Ukk-TV-QJ8" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="k8f-Yl-Dl4"/>
32+
<constraint firstItem="Ukk-TV-QJ8" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="ykT-7i-fZ0"/>
33+
</constraints>
1834
</view>
1935
</viewController>
2036
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
2137
</objects>
2238
<point key="canvasLocation" x="53" y="375"/>
2339
</scene>
2440
</scenes>
41+
<resources>
42+
<image name="Logo" width="341.33334350585938" height="341.33334350585938"/>
43+
<namedColor name="AccentColor">
44+
<color red="1" green="0.90980392156862744" blue="0.69411764705882351" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
45+
</namedColor>
46+
</resources>
2547
</document>
Lines changed: 125 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,143 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22113.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="kSf-2t-Svg">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22089.1"/>
57
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
8+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
69
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
710
</dependencies>
811
<scenes>
9-
<!--View Controller-->
12+
<!--Navigation Controller-->
13+
<scene sceneID="1w1-aS-9iP">
14+
<objects>
15+
<navigationController id="kSf-2t-Svg" sceneMemberID="viewController">
16+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="1xW-i9-kse">
17+
<rect key="frame" x="0.0" y="59" width="393" height="44"/>
18+
<autoresizingMask key="autoresizingMask"/>
19+
</navigationBar>
20+
<connections>
21+
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="3Ny-k7-cRe"/>
22+
</connections>
23+
</navigationController>
24+
<placeholder placeholderIdentifier="IBFirstResponder" id="3dB-YP-Y1J" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
25+
</objects>
26+
<point key="canvasLocation" x="-611" y="4"/>
27+
</scene>
28+
<!--Lumberjack-->
1029
<scene sceneID="tne-QT-ifu">
1130
<objects>
12-
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
31+
<viewController title="Lumberjack" id="BYZ-38-t0r" customClass="ViewController" customModule="Demo" customModuleProvider="target" sceneMemberID="viewController">
1332
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
33+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1534
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
35+
<subviews>
36+
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="ji7-4E-kPc">
37+
<rect key="frame" x="16" y="652" width="361" height="166"/>
38+
<subviews>
39+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aot-xp-jyF">
40+
<rect key="frame" x="0.0" y="0.0" width="361" height="50"/>
41+
<color key="backgroundColor" systemColor="systemBlueColor"/>
42+
<constraints>
43+
<constraint firstAttribute="height" constant="50" id="Zf2-eP-SQu"/>
44+
</constraints>
45+
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
46+
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
47+
<state key="normal" title="Log (Instance)"/>
48+
<userDefinedRuntimeAttributes>
49+
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
50+
<integer key="value" value="8"/>
51+
</userDefinedRuntimeAttribute>
52+
</userDefinedRuntimeAttributes>
53+
<connections>
54+
<action selector="instanceLog:" destination="BYZ-38-t0r" eventType="touchUpInside" id="p1m-cA-2xs"/>
55+
</connections>
56+
</button>
57+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mio-Kv-z2D">
58+
<rect key="frame" x="0.0" y="58" width="361" height="50"/>
59+
<color key="backgroundColor" systemColor="systemBlueColor"/>
60+
<constraints>
61+
<constraint firstAttribute="height" constant="50" id="ana-bi-1Ba"/>
62+
</constraints>
63+
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
64+
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
65+
<state key="normal" title="Log (Custom)"/>
66+
<userDefinedRuntimeAttributes>
67+
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
68+
<integer key="value" value="8"/>
69+
</userDefinedRuntimeAttribute>
70+
</userDefinedRuntimeAttributes>
71+
<connections>
72+
<action selector="customLog:" destination="BYZ-38-t0r" eventType="touchUpInside" id="jC7-Oh-UE6"/>
73+
</connections>
74+
</button>
75+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yKE-rR-eU6">
76+
<rect key="frame" x="0.0" y="116" width="361" height="50"/>
77+
<color key="backgroundColor" systemColor="systemBlueColor"/>
78+
<constraints>
79+
<constraint firstAttribute="height" constant="50" id="gfx-0b-cGY"/>
80+
</constraints>
81+
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
82+
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
83+
<state key="normal" title="Log (Default)"/>
84+
<userDefinedRuntimeAttributes>
85+
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
86+
<integer key="value" value="8"/>
87+
</userDefinedRuntimeAttribute>
88+
</userDefinedRuntimeAttributes>
89+
<connections>
90+
<action selector="defaultLog:" destination="BYZ-38-t0r" eventType="touchUpInside" id="snj-8G-4cH"/>
91+
</connections>
92+
</button>
93+
</subviews>
94+
</stackView>
95+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6G9-7F-6IY">
96+
<rect key="frame" x="16" y="103" width="361" height="549"/>
97+
<subviews>
98+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="{message}" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MtX-M2-jBQ">
99+
<rect key="frame" x="0.0" y="260.33333333333331" width="361" height="28.666666666666686"/>
100+
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
101+
<nil key="textColor"/>
102+
<nil key="highlightedColor"/>
103+
</label>
104+
</subviews>
105+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
106+
<constraints>
107+
<constraint firstItem="MtX-M2-jBQ" firstAttribute="leading" secondItem="6G9-7F-6IY" secondAttribute="leading" id="2D3-DF-ug3"/>
108+
<constraint firstAttribute="trailing" secondItem="MtX-M2-jBQ" secondAttribute="trailing" id="4bh-Uv-n2c"/>
109+
<constraint firstItem="MtX-M2-jBQ" firstAttribute="centerY" secondItem="6G9-7F-6IY" secondAttribute="centerY" id="vR6-UE-WOO"/>
110+
</constraints>
111+
</view>
112+
</subviews>
17113
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
114+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
115+
<constraints>
116+
<constraint firstItem="6G9-7F-6IY" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="C5t-S0-d55"/>
117+
<constraint firstItem="6G9-7F-6IY" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="Gch-jd-7OO"/>
118+
<constraint firstItem="ji7-4E-kPc" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="16" id="P7X-dY-Bxw"/>
119+
<constraint firstItem="ji7-4E-kPc" firstAttribute="bottom" secondItem="6Tk-OE-BBY" secondAttribute="bottom" id="RUJ-e8-bEp"/>
120+
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="6G9-7F-6IY" secondAttribute="trailing" constant="16" id="at4-OF-vZ7"/>
121+
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="ji7-4E-kPc" secondAttribute="trailing" constant="16" id="d4P-Qj-jzU"/>
122+
<constraint firstItem="ji7-4E-kPc" firstAttribute="top" secondItem="6G9-7F-6IY" secondAttribute="bottom" id="mf5-Ni-Bw7"/>
123+
</constraints>
18124
</view>
125+
<navigationItem key="navigationItem" id="MW0-x6-czH"/>
126+
<connections>
127+
<outlet property="messageLabel" destination="MtX-M2-jBQ" id="AHl-zi-ch8"/>
128+
</connections>
19129
</viewController>
20130
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
21131
</objects>
132+
<point key="canvasLocation" x="116.79389312977099" y="3.5211267605633805"/>
22133
</scene>
23134
</scenes>
135+
<resources>
136+
<systemColor name="systemBackgroundColor">
137+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
138+
</systemColor>
139+
<systemColor name="systemBlueColor">
140+
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
141+
</systemColor>
142+
</resources>
24143
</document>

0 commit comments

Comments
 (0)