Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Remove Dependency on Asset catalog to support SPM #189

Closed
wants to merge 4 commits into from

Conversation

lkeude96
Copy link

Before you make a Pull Request, read the important guidelines:

Issue Link 🔗

  • Is this a bug fix or a feature?
  • Does it break any existing functionality?

Goals of this PR 🎉

  • Why is the change important?
  • Remove dependency on the Assets catalog

  • What does this fix?
  • How far has it been tested?

How Has This Been Tested 🔍

Please let us know if you have tested your PR and if we need to reproduce the issues. Also, please let us know if we need any relevant information for running the tests.

  • User Interface Testing
  • Application Testing

Test Configuration 👾

  • Xcode version:
  • Device/Simulator
  • iOS version || MacOSX version

Things to check on 🎯

  • My Pull Request code follows the coding standards and styles of the project
  • I have worked on unit tests and reviewed my code to the best of my ability
  • I have used comments to make other coders understand my code better
  • My changes are good to go without any warnings
  • I have added unit tests both for the happy and sad path
  • All of my unit tests pass successfully before pushing the PR
  • I have made sure all dependent downstream changes impacted by my PR are working

Comment on lines +145 to +168
private func pencil() -> UIBezierPath {
let path = UIBezierPath()
path.move(to: CGPoint(x: 3, y: 17.25))
path.addLine(to: CGPoint(x: 3, y: 21))
path.addLine(to: CGPoint(x: 6.75, y: 21))
path.addLine(to: CGPoint(x: 17.81, y: 9.94))
path.addLine(to: CGPoint(x: 14.06, y: 6.19))
path.addLine(to: CGPoint(x: 3, y: 17.25))
path.close()
path.move(to: CGPoint(x: 20.71, y: 7.04))
path.addCurve(to: CGPoint(x: 20.71, y: 5.63),
controlPoint1: CGPoint(x: 21.1, y: 6.65),
controlPoint2: CGPoint(x: 21.1, y: 6.02))
path.addLine(to: CGPoint(x: 18.37, y: 3.29))
path.addCurve(to: CGPoint(x: 16.96, y: 3.29),
controlPoint1: CGPoint(x: 17.98, y: 2.9),
controlPoint2: CGPoint(x: 17.35, y: 2.9))
path.addLine(to: CGPoint(x: 15.13, y: 5.12))
path.addLine(to: CGPoint(x: 18.88, y: 8.87))
path.addLine(to: CGPoint(x: 20.71, y: 7.04))
path.close()
return path
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually getting drawn based of the SVG file for edit

Comment on lines +80 to +87
let size = CGSize(width: 24.0, height: 24.0)
let sides = 5
let radius: CGFloat = min(size.width, size.height) / 2.0
let origin = CGPoint(x: size.width / 2.0 , y: size.height / 2.0)
let pointiness: CGFloat = 2.0
let startAngle = CGFloat(-1 * (360 / sides / 4))
let adjustment = startAngle + CGFloat(360 / sides / 2)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially might want to refactor this since similar vars are being declared in confetti() and triangle() 🤔

@croossin
Copy link
Contributor

This would suffice to get us on SPM? @lkeude96

@lkeude96
Copy link
Author

lkeude96 commented Oct 24, 2019

@croossin i was able to create a branch from this one and got SPM to work 🎉 .
this branch 👉 https://github.com/lkeude96/CardParts/tree/spm for testing

Ideally we would be reorganizing a bit and clean up the folder and project structure as well but just adding Package.swift with the dependencies and having it point to the appropriate path got it to work in my test project 😄

In addition, i think the above work could also benefit a similar work mentioned in #10 by @lwdupont

cc #172

@lkeude96 lkeude96 changed the title WIP: Remove Dependency on Asset catalog WIP: Remove Dependency on Asset catalog to support SPM Oct 24, 2019
@lkeude96 lkeude96 closed this Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants