Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
heestand-xyz committed Jun 20, 2021
2 parents 26e0562 + 9be4257 commit 14ecfca
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,41 @@ struct ContentView: View {
}
~~~~

### SwiftUI with View Model

~~~~swift
import SwiftUI
import PixelKit

class ViewModel: ObservableObject {

let circlePix: CirclePIX
let blurPix: BlurPIX

let finalPix: PIX

init() {

circlePix = CirclePIX()

blurPix = BlurPIX()
blurPix.input = circlePix
blurPix.radius = 0.25

finalPix = blurPix
}
}

struct ContentView: View {

@StateObject var viewModel = ViewModel()

var body: some View {
NODERepView(node: viewModel.finalPix)
}
}
~~~~

### UIKit

~~~~swift
Expand Down

0 comments on commit 14ecfca

Please sign in to comment.