Skip to content

Commit f0759fd

Browse files
committed
docs :: another language readme udpate
1 parent fd5b46a commit f0759fd

File tree

3 files changed

+313
-30
lines changed

3 files changed

+313
-30
lines changed

README.md

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# DynamicTextEditor
22

3-
`DynamicTextEditor`는 사용자의 입력에 따라 높이가 자동으로 조절되는 SwiftUI 기반의 TextEditor Component입니다.
4-
5-
> 카카오톡 앱의 채팅화면에 TextField와 같이 동적으로 Height가 변하는 TextEditor
3+
`DynamicTextEditor` is a SwiftUI-based `TextEditor` component that automatically adjusts its height according to the user’s input.
4+
5+
> Similar to the chat input field in KakaoTalk, where the text field dynamically grows with the number of lines.
6+
7+
---
8+
9+
## Language
10+
🇰🇷 [한국어 README](README_KR.md) | 🇺🇸 [English README](README.md) | 🇯🇵 [日本語 README](README_JP.md)
611

712
## ✨ Features
813

9-
- ✅ 최대 줄 수 설정 가능
10-
- ✅ placeholder 텍스트 지원
11-
- ✅ 동적으로 height가 변하는 TextEditor
12-
- ✅ Custom Font 적용 가능
14+
- ✅ Set maximum line count
15+
- ✅ Support for placeholder text
16+
- ✅ Automatically resizing `TextEditor`
17+
- ✅ Custom font support
18+
1319
---
1420

1521
## 🛠 Requirements
1622

17-
- iOS 15+
18-
- SwiftUI
23+
- iOS 15+
24+
- SwiftUI
1925

2026
---
2127

@@ -25,28 +31,29 @@
2531

2632
```swift
2733
dependencies: [
28-
.package(url: "https://github.com/your-id/DynamicTextEditor.git", branch: "main")
34+
.package(url: "https://github.com/winwx/DynamicTextEditor.git", branch: "main")
2935
]
3036
```
37+
3138
---
3239

3340
## 🚀 Usage
3441

35-
### 기본 예시
42+
### Basic Example
3643
```swift
3744
import SwiftUI
3845
import DynamicTextEditor
3946

4047
@State var text: String = ""
4148

4249
var body: some View {
43-
DynamicTextEditor("내용을 입력해주세요.", text: $text)
50+
DynamicTextEditor("Enter your text...", text: $text)
4451
}
4552
```
4653

47-
<img src="GIFs/Default_DynamicTextEditor.gif" width="300"/>
54+
<img src="GIFs/Default_DynamicTextEditor.gif" width="300"/>
4855

49-
### 카카오톡 클론 코딩 예시
56+
### KakaoTalk Clone Example
5057
```swift
5158
import SwiftUI
5259
import DynamicTextEditor
@@ -57,7 +64,7 @@ var body: some View {
5764
...
5865
HStack(alignment: .bottom, spacing: 16) {
5966
DynamicTextEditor(
60-
"메시지 입력",
67+
"Type a message",
6168
text: $text
6269
)
6370
.setFont(uiFont: .systemFont(ofSize: 16))
@@ -76,53 +83,58 @@ var body: some View {
7683
}
7784
```
7885

79-
<img src="GIFs/DynamicTextEditor_clone_kakaotalk.gif" width="300"/>
86+
<img src="GIFs/DynamicTextEditor_clone_kakaotalk.gif" width="300"/>
87+
88+
---
8089

8190
## 🎛 Modifier API
8291

83-
DynamicTextEditor는 SwiftUI의 Modifier 스타일 API로 다양한 속성을 설정할 수 있습니다.
92+
DynamicTextEditor provides a SwiftUI-style modifier API to customize its behavior and appearance.
93+
8494
### 🔤 `setFont(uiFont:)`
8595

86-
사용할 UIFont를 설정합니다.
96+
Sets the font using `UIFont`.
8797

8898
```swift
89-
DynamicTextEditor("입력", text: $text)
99+
DynamicTextEditor("Input", text: $text)
90100
.setFont(uiFont: .systemFont(ofSize: 16, weight: .medium))
91101
```
92102

93103
### 📏 `setMaxLineCount(_:)`
94104

95-
최대 줄 수를 설정합니다. 기본값은 5입니다.
105+
Sets the maximum number of lines. Default is **5**.
96106

97107
```swift
98-
DynamicTextEditor("입력", text: $text)
108+
DynamicTextEditor("Input", text: $text)
99109
.setMaxLineCount(3)
100-
````
110+
```
101111

102112
### 🎨 `setTextColor(_:)`
103113

104-
텍스트 색상을 설정합니다. 기본값은 '.black'입니다.
114+
Sets the text color. Default is `.black`.
105115

106116
```swift
107-
DynamicTextEditor("입력", text: $text)
117+
DynamicTextEditor("Input", text: $text)
108118
.setTextColor(.gray)
109119
```
110120

111-
### 👤 `setPlcaeholderColor(_:)`
121+
### 👤 `setPlaceholderColor(_:)`
112122

113-
텍스트 색상을 설정합니다. 기본값은 '.gray'입니다.
123+
Sets the placeholder color. Default is `.gray`.
114124

115125
```swift
116-
DynamicTextEditor("입력", text: $text)
126+
DynamicTextEditor("Input", text: $text)
117127
.setPlaceholderColor(.black)
118128
```
119129

120-
🧪 커스텀 예시
130+
---
131+
132+
🧪 Custom Example
121133

122134
```swift
123-
DynamicTextEditor("댓글을 입력하세요", text: $text)
135+
DynamicTextEditor("Write a comment...", text: $text)
124136
.setFont(uiFont: .systemFont(ofSize: 14))
125137
.setMaxLineCount(4)
126138
.setTextColor(.blue)
127-
.setPlaceholder(.red)
139+
.setPlaceholderColor(.red)
128140
```

README_JP.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# DynamicTextEditor
2+
3+
`DynamicTextEditor` は、ユーザーの入力に応じて自動的に高さが調整される SwiftUI ベースの `TextEditor` コンポーネントです。
4+
5+
> カカオトークのチャット入力欄のように、入力行数に合わせて動的に高さが変わります。
6+
7+
---
8+
9+
## Language
10+
🇰🇷 [한국어 README](README_KR.md) | 🇺🇸 [English README](README.md) | 🇯🇵 [日本語 README](README_JP.md)
11+
12+
## ✨ 特徴
13+
14+
- ✅ 最大行数を設定可能
15+
- ✅ プレースホルダーテキスト対応
16+
- ✅ 自動で高さが変わる `TextEditor`
17+
- ✅ カスタムフォント対応
18+
19+
---
20+
21+
## 🛠 必要条件
22+
23+
- iOS 15+
24+
- SwiftUI
25+
26+
---
27+
28+
## 📦 インストール
29+
30+
### Swift Package Manager (SPM)
31+
32+
```swift
33+
dependencies: [
34+
.package(url: "https://github.com/winwx/DynamicTextEditor.git", branch: "main")
35+
]
36+
```
37+
38+
---
39+
40+
## 🚀 使用方法
41+
42+
### 基本的な例
43+
```swift
44+
import SwiftUI
45+
import DynamicTextEditor
46+
47+
@State var text: String = ""
48+
49+
var body: some View {
50+
DynamicTextEditor("テキストを入力してください...", text: $text)
51+
}
52+
```
53+
54+
<img src="GIFs/Default_DynamicTextEditor.gif" width="300"/>
55+
56+
### カカオトーク風クローン例
57+
```swift
58+
import SwiftUI
59+
import DynamicTextEditor
60+
61+
@State var text: String = ""
62+
63+
var body: some View {
64+
...
65+
HStack(alignment: .bottom, spacing: 16) {
66+
DynamicTextEditor(
67+
"メッセージを入力",
68+
text: $text
69+
)
70+
.setFont(uiFont: .systemFont(ofSize: 16))
71+
.setMaxLineCount(8)
72+
.setTextColor(.black)
73+
.setPlaceholderColor(.gray)
74+
.frame(minHeight: 24)
75+
76+
emojiButton()
77+
}
78+
.padding(.vertical, 6)
79+
.padding(.horizontal, 8)
80+
.background(Color.textField_BG)
81+
.cornerRadius(20)
82+
...
83+
}
84+
```
85+
86+
<img src="GIFs/DynamicTextEditor_clone_kakaotalk.gif" width="300"/>
87+
88+
---
89+
90+
## 🎛 モディファイア API
91+
92+
DynamicTextEditor は、SwiftUI スタイルのモディファイア API を提供し、動作や見た目をカスタマイズできます。
93+
94+
### 🔤 `setFont(uiFont:)`
95+
96+
`UIFont` を使ってフォントを設定します。
97+
98+
```swift
99+
DynamicTextEditor("入力", text: $text)
100+
.setFont(uiFont: .systemFont(ofSize: 16, weight: .medium))
101+
```
102+
103+
### 📏 `setMaxLineCount(_:)`
104+
105+
最大行数を設定します。デフォルトは **5** です。
106+
107+
```swift
108+
DynamicTextEditor("入力", text: $text)
109+
.setMaxLineCount(3)
110+
```
111+
112+
### 🎨 `setTextColor(_:)`
113+
114+
テキストの色を設定します。デフォルトは `.black` です。
115+
116+
```swift
117+
DynamicTextEditor("入力", text: $text)
118+
.setTextColor(.gray)
119+
```
120+
121+
### 👤 `setPlaceholderColor(_:)`
122+
123+
プレースホルダーの色を設定します。デフォルトは `.gray` です。
124+
125+
```swift
126+
DynamicTextEditor("入力", text: $text)
127+
.setPlaceholderColor(.black)
128+
```
129+
130+
---
131+
132+
🧪 カスタム例
133+
134+
```swift
135+
DynamicTextEditor("コメントを入力してください...", text: $text)
136+
.setFont(uiFont: .systemFont(ofSize: 14))
137+
.setMaxLineCount(4)
138+
.setTextColor(.blue)
139+
.setPlaceholderColor(.red)
140+
```

0 commit comments

Comments
 (0)