Drawing application with Apple Pencil and touch support built for a Telegram iOS Contest.
Awarded 4th place with an $800 prize.
This project is an older contest app modernized as a portfolio artifact. The app lets users choose a photo from the photo library, draw over it on a custom canvas, adjust brush color and width, add simple shapes/text, undo strokes, clear the canvas, and export the edited result back to Photos.
- 4th place
- $800 award
- Built as an independent contest project
- UIKit-based photo editing flow
- Custom Core Graphics drawing canvas
- Apple Pencil and touch input handling
- Coalesced touch processing for smoother strokes
- Stroke model and rendering pipeline separated from the view layer
- Brush/color/opacity controls
- Undo and clear support for drawing strokes
- Photo Library import/export
- Accessibility labels for primary editing controls
The original contest project was a compact MVC UIKit app. It has been refactored toward a clearer MVVM-style structure while preserving the original product behavior.
TelegramContest/
Domain/
DrawingDocument.swift
DrawingTool.swift
Stroke.swift
StrokePoint.swift
Presentation/
Canvas/
CanvasState.swift
CanvasViewModel.swift
Rendering/
DrawingRenderer.swift
DrawingRendering.swift
PathSmoother.swift
StrokeRenderer.swift
Input/
PencilInputHandler.swift
Persistence/
ImageExporter.swift
Controller/
View/
Extensions/
Transition/
CanvasViewowns UIKit drawing lifecycle and forwards touch events.CanvasViewModelowns drawing state and stroke lifecycle.PencilInputHandlerconverts UIKit touches into domain-levelStrokePointvalues.DrawingRendererandStrokeRendererisolate Core Graphics rendering.DrawingDocumentstores completed strokes and supports undo/clear.ImageExporterowns view snapshot export.
Placeholder assets are included until real device screenshots are added.
- Open
TelegramContest.xcodeprojin Xcode. - Let Xcode resolve the Swift Package dependency for Lottie.
- Select the
TelegramContestscheme. - Build and run on an iPhone simulator or device.
- Grant Photos access when prompted.
- Xcode 14 or newer
- iOS 13.0 or newer
- Swift 5
- Swift Package Manager dependency: lottie-ios
- This is an older contest project, not a production photo editor.
- Text and shape editing are intentionally lightweight.
- Undo currently applies to drawing strokes, not every editor object type.
- The renderer redraws all strokes on every invalidation; a cached/tiled renderer would be the next performance step for very large drawings.
- Introduced domain models for strokes, stroke points, tools, and documents.
- Separated input handling, drawing state, and Core Graphics rendering.
- Added coalesced touch collection and Pencil metadata capture.
- Removed screen-height coordinate offsets from canvas rendering.
- Replaced global canvas/color callbacks with instance-level bindings.
- Replaced synchronous photo loading paths with asynchronous image requests.
- Removed stale CocoaPods project references and hard-coded manual signing.
- Added export isolation through
ImageExporter. - Reduced force unwraps in drawing, color, gallery, transition, and asset-loading paths.
- Added accessibility labels for core editor, color picker, gallery, and access controls.
- Add unit tests for
CanvasViewModel, stroke lifecycle, and color parsing. - Add UI tests for the gallery-to-editor-to-export flow.
- Add a renderer cache so completed strokes are not fully redrawn on every touch update.
- Add predicted Pencil touches and better force/width mapping.
- Add a real document persistence format for editable drawings.
- Extend undo/redo to text, shapes, color changes, and object transforms.
- Replace hard-coded layout constants with a more adaptive design system.
- Add real screenshots and a short screen recording.
Built by Ivan Nichypar.
Senior iOS Engineer focused on complex UI systems, SwiftUI/UIKit, accessibility, performance, custom interactions, Apple Pencil/touch input, and product-quality mobile UX.