https://github.com/hansemannn/titanium-pencilkit
Use the native iOS 13+ PencilKit framework in Titanium.
https://github.com/hansemannn/titanium-pencilkit
appcelerator ios13 pencilkit titanium
Last synced: 12 months ago
JSON representation
Use the native iOS 13+ PencilKit framework in Titanium.
- Host: GitHub
- URL: https://github.com/hansemannn/titanium-pencilkit
- Owner: hansemannn
- License: mit
- Created: 2019-10-12T07:34:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-01T08:04:28.000Z (about 1 year ago)
- Last Synced: 2025-05-01T09:19:53.650Z (about 1 year ago)
- Topics: appcelerator, ios13, pencilkit, titanium
- Language: Objective-C
- Size: 14.6 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Titanium iOS 13+ PencilKit
Use the native iOS 13+ PencilKit framework in Axway Titanium. This module is sponsored by [binaries included](https://binaries-included.net)!
## Requirements
- [x] Titanium SDK 8.2.0+
- [x] iOS 13+
- [x] Xcode 11+
## Example
```js
import PencilKit from 'ti.pencilkit';
const win = Ti.UI.createWindow({
title: 'Current canvas'
});
const nav = Ti.UI.createNavigationWindow({
window: win
});
win.addEventListener('open', () => {
canvasView.focus();
});
const saveButton = Ti.UI.createButton({
title: 'Save'
});
saveButton.addEventListener('click', saveCanvas);
win.rightNavButton = saveButton;
const canvasView = PencilKit.createCanvasView();
win.add(canvasView);
nav.open();
function saveCanvas() {
canvasView.generateImage({
callback: event => {
const win2 = Ti.UI.createWindow({
title: 'Saved canvas',
backgroundColor: '#fff'
});
const nav2 = Ti.UI.createNavigationWindow({
window: win2
});
win2.add(Ti.UI.createImageView({
image: event.image
}));
nav2.open({
modal: true
});
}
});
}
```
## Author
Hans Knöchel
## License
MIT
## Copyright
(c) 2019-present by [binaries included](https://binaries-included.net)