Back to projects

iOS / SwiftUI / Local Image Generation

Localframe

Localframe is a SwiftUI image generation demo for iOS 26. It uses Image Playground to turn prompts into generated images locally, keeping prompts and outputs on the device.

SwiftUIiOS 26Image PlaygroundLocal AI

Purpose

What it is for

The app explores how Apple’s on-device image generation tools can be presented in a clean native interface. It is a compact demonstration of prompt input, style selection, generation, and temporary display of generated images.

Behavior

What it does

Image creation runs through Apple’s Image Playground framework.
The interface is centered on writing a text prompt, choosing an ImagePlaygroundStyle, and reviewing generated output.
Generated images are stored in memory for display and are not saved after closing the app.
Like the other local AI demos, Localframe is meant for experimentation rather than production use.

Implementation

How it is built

The app imports ImagePlayground where image generation is needed.

It creates an ImageCreator asynchronously and surfaces ImageCreator errors when initialization fails.

Generation streams image results from imageCreator.images(for:style:limit:) and appends returned CGImages to UI state.

The SwiftUI surface stays minimal so the framework integration remains the main focus.