Skip to content

Instantly share code, notes, and snippets.

View J0ker98's full-sized avatar
🎯
Focusing

Stefano Zeppieri J0ker98

🎯
Focusing
View GitHub Profile
@mjm
mjm / LinkedText.swift
Created May 21, 2020 03:56
Tappable links in SwiftUI Text view
import SwiftUI
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue)
struct LinkColoredText: View {
enum Component {
case text(String)
case link(String, URL)
}