Questions tagged [pencilkit]

PencilKit is Apple's framework for capturing touch input as an opaque drawing and displaying that content from your app.

PencilKit is Apple's framework for capturing touch input as an opaque drawing and displaying that content from your app.

Apple first revealed PencilKit at WWDC on June 3, 2019, and made it available in the first beta release of Xcode 11.

PencilKit is part of the following SDKs:

  • iOS 13.0 and later,
  • macOS 10.15 and later,
  • Mac Catalyst 13.0 and later.
140 questions
1
vote
1 answer

I want to use PencilKit to draw perfectly shaped shapes. What should I do?

Using Apple's own photo album, when editing photos, I used the Apple Pencil to draw blurred red paths, keeping and then creating perfect circles. I looked at the API for PencilKit and found that Apple does not provide one. But I want to implement…
code
  • 13
  • 2
1
vote
0 answers

PencilKit Marker Transparency

In swift I am using Pencilkit to draw on a canvas. However, the marker tool always seems to have some transparency to the color that I am not setting to it. I believe this is a default feature for the marker but I would like to remove the…
Evan C
  • 11
  • 2
1
vote
0 answers

Can i use pencil kit to draw on 3D models in scenekit Swift UI

Ok, so i've been using apples swift for about 6-7 months now, my current group and I, were exploring a few ideas for our last project at the academy. my mind is completely hung on an app targeted around 3d design. Not modeling, essentially taking…
1
vote
1 answer

Show PKDrawing on macOS in SwiftUI

Is it possible to display a PKDrawing on macOS that was previously created on an iOS device?
1
vote
1 answer

Prevent user from erasing drawings with PencilKit - Swift

I'm building a drawing app using PencilKit and I have a pre-loaded PKDrawing that loads with PKCanvasView. My goal it's to allow the user to play with the canvas using the pre-loaded PKDrawing as a reference. My question is: Is it possible to make…
1
vote
1 answer

Scale PencilKit Drawing to Fit Canvas size

I have a PKCanvasView in my IOS app. When the user puts in a drawing, it saves the strokes as a PKDrawing. This drawing could be accessed on many different devices with different screen sizes. However, when a drawing that is created on a larger…
JustMakeStuff
  • 419
  • 3
  • 19
1
vote
0 answers

Data Communication between Unity and NativeiOS over Realm?

I am working on an app that uses a native iOS as a base to show a 3D Room in Unity. I archive this by using: https://docs.unity3d.com/Manual/UnityasaLibrary-iOS.html I want to use iOS native because of the pencilKit support. I am now looking for the…
jakob witsch
  • 157
  • 1
  • 1
  • 12
1
vote
1 answer

PencilKit drawings sometimes change to black in dark mode

I have an app using PencilKit. I have noticed that occasionally when I am in dark mode and using the white colour, when I finish drawing and render the strokes into an image to draw, the white lines go to black. I am using: …
1
vote
1 answer

iOS PencilKit not drawing on the PKCanvasView

In iOS Simulator, I've followed the basic steps to include PencilKit into my view controller. I got the toolKit in the UI but couldn't draw.. Not sure what I'm missing here. Sharing my code which I tried. import UIKit import PencilKit class…
1
vote
0 answers

Is there a way to widen the possible width range for Apple Pencil drawings in PencilKit?

Most high-end drawing apps on the iPad provide a means to edit the "pressure curve" of the Apple Pencil, namely how much adding pressure affects the width of the line created. Apple's PencilKit provides tools (e.g., a "pen") with pressure-sensitive…
Daven Quinn
  • 134
  • 2
  • 7
1
vote
0 answers

Drawing with PencilKit - toolPicker not responding

i have a problem with my toolPicker. when I choose a tool or the color does not change but when I do it in code everything is OK class ViewController5 : UIViewController { let canvas : PKCanvasView = { let canvasView = PKCanvasView() …
Sebastian
  • 61
  • 1
  • 9
1
vote
1 answer

How to export .drawing file

I'm trying to draw something in app with PencilKit. Now I want to export my drawings from my file, so I could open send it to other devices, and then open it(in format PKDrawing).
1
vote
0 answers

SwiftUI PencilKit Coordinator for navigation

Rather than selecting from a list, I'm trying to navigate between drawings like a book by using buttons to cycle through, but the canvas doesn't update. I'm following the great tutorial by DevTechie at…
1
vote
1 answer

PencilKit save background image and drawing to Album Xcode

I want to save my canvas to album, but my subview is not visible when I go back to album. I only have my canvas with my drawings. What should I change ? struct Home : View { @State var canvas = PKCanvasView() @State var…
Clément Tengip
  • 618
  • 6
  • 19
1
vote
1 answer

Saving data into sqlite3 database in Swift

I am working on an app that uses PencilKit. I am trying to save the PK drawing in the form of data in a sqlite3 database but it is not saving. I assume the problem is with the save function, not the one that fetches the drawing data to display…
Clare
  • 71
  • 6