Investigating this I've come across a computed variable in the default PKInk named validWidthRange it has these ranges:
for .pen: 0.8781664588318914...25.659259612471967 for .pencil: 2.4000000953674316...16.0
Is there any way I can increase these ranges? Or crate a copy of .pen PKInk with my own validWidthRange?
Post
Replies
Boosts
Views
Activity
Investigating this I've come across a computed variable in the default PKInk named validWidthRange it has these ranges:
for .pen: 0.8781664588318914...25.659259612471967
for .pencil: 2.4000000953674316...16.0
Is there any way I can increase these ranges? Or create a copy of .pen PKInk with my own validWidthRange?
@DTS Engineer is correct. I ended up utilizing the new URL's static variable like URL.applicationSupportDirectory and the new method appending(path:directoryHint:) and the final code is:
func findImage(name: String) -> UIImage? {
let url = URL.applicationSupportDirectory
.appending(path: "MyFolder", directoryHint: .isDirectory)
.appending(path: "\(name).png", directoryHint: .notDirectory)
return UIImage(contentsOfFile: url.path(percentEncoded: false))
}
Writing this as an answer to checkout the final code.
Don't know whether there is a better way than UIImage(contentsOfFile:) but it does the job for now ¯\ _ (ツ) _ /¯
Hi, have you found the solution for this?