Jan Codes

Sharing my coding adventures with the world.

  • Home
  • About me
Conditionally applying View Modifiers in SwiftUI
swift

Conditionally applying View Modifiers in SwiftUI

Oftentimes I get to a situation where I need to apply a View Modifier only if a certain condition is met. Achieving this - surprisingly - is not so easy in SwiftUI. Fortunately,

  • Jan Kaltoun
    Jan Kaltoun
1 min read
Custom modal dialog with SwiftUI
ios

Custom modal dialog with SwiftUI

While building a fully SwiftUI app I needed a fully customizable modal dialog that I could present things in with as little effort as possible. So I built it.SwiftUI is immensely powerful

  • Jan Kaltoun
    Jan Kaltoun
8 min read
Creating dashed border around View in SwiftUI
swift

Creating dashed border around View in SwiftUI

Creating borders around Views in SwiftUI is simple. But what if you wanted to create a stroked border? Let's see how to do that!

  • Jan Kaltoun
    Jan Kaltoun
1 min read
Creating a header by laying out from top in SwiftUI
swift

Creating a header by laying out from top in SwiftUI

This might sound silly but it took me a while to wrap my head around laying views out from top in SwiftUI. Here's how to do it if you're wondering too!

  • Jan Kaltoun
    Jan Kaltoun
1 min read
SwiftUI: Presenting a modal sheet
swift

SwiftUI: Presenting a modal sheet

SwiftUI is still very new and still in beta but it is already great and we can play with it! While writing my first SwiftUI app I needed to present a modal sheet.

  • Jan Kaltoun
    Jan Kaltoun
2 min read
WebSockets & authentication in Vapor 3
swift

WebSockets & authentication in Vapor 3

Authentication and authorisation in Vapor 3 is very easy with Vapor's auth library. You simply add the library into your project and use one of the middlewares to authorize users. Unfortunately this is not as easy to do when your route allows WebSocket connections.

  • Jan Kaltoun
    Jan Kaltoun
4 min read
Verifying RSA JWT signatures in Swift
swift

Verifying RSA JWT signatures in Swift

There are many ways of authenticating to your backend APIs and one of them are JWT or JSON Web Tokens. To make sure your token is genuine, you need to verify its signature. Let's do it in Swift!

  • Jan Kaltoun
    Jan Kaltoun
2 min read
Debugging IBDesignables
swift

Debugging IBDesignables

@IBDesignable views are great. They let you visualize your custom embedded views, making it easy to see what your UI will look like once the app runs. Unfortunately many people don't use them

  • Jan Kaltoun
    Jan Kaltoun
2 min read
Marzipan - UIKit on macOS
swift

Marzipan - UIKit on macOS

EDIT: July 26, 2019 WWDC 2019 brought us SwiftUI and Catalyst. As such this article is not relevant anymore. Feel free to look at the documentation provided by Apple and have fun with

  • Jan Kaltoun
    Jan Kaltoun
7 min read
Hello world!

Hello world!

Hi there! Welcome to my blog! My name is Jan Kaltoun. I am an iOS developer currently living in beautiful Prague and working at STRV. I have a great passion for coding and

  • Jan Kaltoun
    Jan Kaltoun
1 min read
Jan Codes © 2021
Latest Posts Ghost