Skip to content

Instantly share code, notes, and snippets.

View svanimpe's full-sized avatar

Steven Van Impe svanimpe

View GitHub Profile
@svanimpe
svanimpe / objectbinding-childview.swift
Created June 11, 2019 11:35
SwiftUI ObjectBinding in child view
struct LotListView : View {
@EnvironmentObject var store: ParkingStore
var body: some View {
List(store.parkingLots) { lot in
NavigationButton(destination: LotDetailView(lot: lot)) {
LotListRow(lot: lot)
}
}
@svanimpe
svanimpe / uiviewrepresentable-objectbinding.swift
Last active October 19, 2021 23:09
SwiftUI ObjectBinding in a UIViewRepresentable
struct LotMapWrapperView: View {
@EnvironmentObject var store: ParkingStore
var body: some View {
LotMapView(store: store)
}
}
struct LotMapView: UIViewRepresentable {
@svanimpe
svanimpe / blog.md
Created November 6, 2017 14:19
Swift blog

Getting started with Kitura and IBM Cloud

This past year, I have spent quite some time experimenting with Kitura, exploring its features and assessing its ease-of-use. As a lecturer, my goal was to evaluate the state of the server-side Swift ecosystem, to add a back-end component to my iOS course and to eventually create a full course around Swift on the server.

I was pleasantly surprised by what Kitura has to offer, how easy it is to use and how helpful the team is in answering questions and debugging issues. Along the way, my experiments evolved into an application with an ever-growing set of features and several hundred users. While I will open source and document that application in the coming months, I want to start with something smaller and more approachable. To that end, I rewrote my personal website and blog in Swift.

The result is a simple template rendering app. It shows how to:

  • do basic routing
  • serve static files (stylesheets, scripts, images, ...)