-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from velos/feature/spm-documentation-updates
SPM Tweaks and Documentation Updates
- Loading branch information
Showing
12 changed files
with
142 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 0 additions & 78 deletions
78
Example/IconHarness.xcodeproj/xcshareddata/xcschemes/IconGenerator.xcscheme
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// | ||
// Icon.swift | ||
// | ||
// Created by Zac White. | ||
// Copyright © 2020 Velos Mobile LLC / https://velosmobile.com / All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import SwiftUIcon | ||
|
||
struct Icon: View { | ||
|
||
var body: some View { | ||
/// Note: All of these assume a canvas size of 1024. | ||
let spacing: CGFloat = 80 | ||
let radius: CGFloat = 135 | ||
let pillLength: CGFloat = 350 | ||
let pillRotation: Angle = .degrees(30) | ||
let circleOffsetX: CGFloat = 50 | ||
let circleOffsetY: CGFloat = 20 | ||
|
||
let velosBackground = Color(red: 0/256, green: 180/256, blue: 185/256) | ||
let velosPrimary = Color.white | ||
let velosSecondary = Color(red: 248/256, green: 208/256, blue: 55/256) | ||
|
||
return IconStack { canvas in | ||
velosBackground | ||
.edgesIgnoringSafeArea(.all) | ||
|
||
HStack(alignment: .center, spacing: canvas[spacing]) { | ||
HStack(alignment: .top, spacing: canvas[spacing]) { | ||
Circle() | ||
.fill(velosPrimary) | ||
.frame(width: canvas[radius], height: canvas[radius]) | ||
.offset(x: canvas[circleOffsetX], y: canvas[circleOffsetY]) | ||
RoundedRectangle(cornerRadius: canvas[radius]) | ||
.fill(velosPrimary) | ||
.frame(width: canvas[radius], height: canvas[pillLength]) | ||
.rotationEffect(pillRotation) | ||
} | ||
HStack(alignment: .bottom, spacing: canvas[spacing]) { | ||
RoundedRectangle(cornerRadius: canvas[radius]) | ||
.fill(velosSecondary) | ||
.frame(width: canvas[radius], height: canvas[pillLength]) | ||
.rotationEffect(pillRotation) | ||
RoundedRectangle(cornerRadius: canvas[radius]) | ||
.fill(velosSecondary) | ||
.frame(width: canvas[radius], height: canvas[pillLength]) | ||
.rotationEffect(pillRotation) | ||
Circle() | ||
.fill(velosSecondary) | ||
.frame(width: canvas[radius], height: canvas[radius]) | ||
.offset(x: -canvas[circleOffsetX], y: -canvas[circleOffsetY]) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
#if DEBUG | ||
struct Icon_Previews : PreviewProvider { | ||
static var previews: some View { | ||
Group { | ||
Icon() | ||
.previewIcon() | ||
.previewLayout(.sizeThatFits) | ||
|
||
Icon() | ||
.previewHomescreen() | ||
.background( | ||
LinearGradient( | ||
gradient: Gradient(colors: [.purple, .orange]), | ||
startPoint: .bottom, | ||
endPoint: .top | ||
) | ||
) | ||
.previewLayout(.fixed(width: 500, height: 500)) | ||
} | ||
} | ||
} | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// swift-tools-version:5.3 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "SwiftUIcon", | ||
products: [ | ||
.library( | ||
name: "SwiftUIcon", | ||
targets: ["SwiftUIcon"]), | ||
], | ||
dependencies: [ | ||
.library(name: "SwiftUIcon", targets: ["SwiftUIcon"]), | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "SwiftUIcon", | ||
dependencies: [], | ||
path: "Icon"), | ||
exclude: [ | ||
"main.swift", | ||
"IconGenerator.swift" | ||
], | ||
sources: ["Icon+PreviewHelpers.swift"] | ||
), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.