๐ŸŽ Apple/UIKit

let backImage = UIImage(systemName: "arrow.backward") navigationBar.backIndicatorImage = backImage navigationBar.backIndicatorTransitionMaskImage = backImage navigationBar.tintColor = .white UINavigationController๋ฅผ ์ƒ์†๋ฐ›๋Š” ViewController class ์˜ viewDidLoad() ์•ˆ์—์„œ ์‚ฌ์šฉํ•˜์˜€๋‹ค.
let section = NSCollectionLayoutSection(group: group) section.orthogonalScrollingBehavior = .continuous ํ˜„์žฌ ์„น์…˜์˜ ๋„ˆ๋น„์— ๊ตฌ์• ๋ฐ›์ง€ ์•Š๊ณ  horizontal scrollํ•˜๋ ค๋ฉด orthogonalScrollingBehavior์„ .continous๋กœ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์ขŒ์šฐ๋กœ ์Šคํฌ๋กค์ด ๊ฐ€๋Šฅํ•ด์ง„๋‹ค. ์†์„ฑ์„ .groupPaging์œผ๋กœ ๋ฐ”๊ฟ”์ฃผ๋ฉด ์˜†์œผ๋กœ ์Šคํฌ๋กค ํ•  ๋•Œ ํŽ˜์ด์ง€๋ฅผ ๋„˜๊ธฐ๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์œผ๋กœ ๋Š์–ด์ง€๋ฉด์„œ ๋ณด์—ฌ์ง„๋‹ค.
textView์—์„œ๋Š” multi-line์„ ์ž…๋ ฅํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋‹ค์Œ์˜ ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์—”ํ„ฐ ์ž…๋ ฅ์„ ๊ฐ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค. func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { guard text == "\n" else { return true } dismiss(animated: true) return true } ๋ฐ˜ํ™˜ ๊ฐ’(Return Value) true >> if the old text should be replaced by the new text ์ด์ „ ํ…์ŠคํŠธ๋ฅผ ์ƒˆ ํ…์ŠคํŠธ๋กœ ๋Œ€์ฒดํ•ด์•ผ ํ•  ๊ฒฝ์šฐ false >> if the replacement operation s..
import UIKit final class SourceTextViewController: UIViewController { private let placeholderText = "ํ…์ŠคํŠธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”" private lazy var textView: UITextView = { let textView = UITextView() textView.text = placeholderText textView.textColor = .secondaryLabel textView.font = .systemFont(ofSize: 16, weight: .semibold) textView.returnKeyType = .done textView.delegate = self return textView }() override f..
JINiOS
'๐ŸŽ Apple/UIKit' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก