Skip to content

Instantly share code, notes, and snippets.

View Jager-yoo's full-sized avatar

Jaeho Yoo Jager-yoo

View GitHub Profile
@Jager-yoo
Jager-yoo / forceCharWrapping.swift
Created February 3, 2024 01:07
forceCharWrapping for watchOS Text
extension String {
/// Forces the string to apply the break by character mode.
///
/// Text("This is a long text.".forceCharWrapping)
var forceCharWrapping: Self {
self.map({ String($0) }).joined(separator: "\u{200B}")
}
}
@Jager-yoo
Jager-yoo / ProgrammaticScrolling.swift
Created May 14, 2023 14:26
programmatic scrolling 실험
import SwiftUI
struct ContentView: View {
private let target: Int = 100 // ⬅️ 이동할 숫자
var body: some View {
ScrollViewReader { proxy in
ScrollView {
ForEach(1..<200) { num in
@Jager-yoo
Jager-yoo / LinkNavigator_README_KR.md
Created February 22, 2023 09:42
LinkNavigator README in Korean

- Concept

✨ LinkNavigator 는 SwiftUI 에서 화면을 자유롭게 이동할 수 있도록 도와주는 라이브러리입니다.

  • URL path 형식의 표현 방법을 통해, 화면 이동에 대한 직관적인 syntax 를 제공합니다.
  • 딥링크 처리 방식으로 어떤 화면이든 간편하게 이동할 수 있습니다.
  • 화면 이동과 함께 매개변수를 주입할 수 있습니다.
  • MVI 디자인 패턴, 혹은 pointfreeco 의 The Composable Architecture 와 같은 Uni-directional Architecture 에서 사용할 목적으로 디자인 되었지만, 그 외의 Architecture 에서도 사용하기 좋습니다.