OVERPAY
  • 홈
  • 태그
  • 방명록
  • 메뉴 닫기
  • 글작성
  • 방명록
  • 환경설정
    • OVERPAY (58)
      • 개발 (47)
        • ANDROID 안드로이드 (16)
        • SWIFT 아이폰 (30)
        • 정보 (1)
      • 무료 소프트웨어 (3)
      • 정보 (6)
  • 홈
  • 태그
  • 방명록
개발/SWIFT 아이폰

SwiftUI TextField 입력 중 Border line 색상 변경

텍스트 필드 수정 중인 경우 보더 라인 색상 변경 struct ContentView: View { @State private var inputText: String = "" @State private var isInputFocused: Bool = false var body: some View { VStack { TextField("텍스트를 입력하세요", text: $inputText, onEditingChanged: { editing in isInputFocused = editing }) .textFieldStyle(PlainTextFieldStyle()) .foregroundColor(.blue) // 글자 컬러 .accentColor(.blue) .padding(10) // 외부 패딩 적용 .fon..

2023. 7. 17. 14:51
개발/SWIFT 아이폰

SwiftUI TextField border line 설정

텍스트 필드 보더 라인 설정 struct ContentView: View { @State private var inputText: String = "" var body: some View { VStack { TextField("텍스트를 입력하세요", text: $inputText) .textFieldStyle(PlainTextFieldStyle()) .foregroundColor(.blue) // 글자 컬러 .accentColor(.blue) .padding(10) // 외부 패딩 적용 .font(.system(size: 20, weight: .heavy, design: .default)) .background(RoundedRectangle(cornerRadius: 15).fill(Color.gray))..

2023. 7. 17. 14:39
개발/SWIFT 아이폰

SwiftUI TextField 라운드 처리, 내부 외부 패딩 설정

텍스트 필드 라운드 처리 struct ContentView: View { @State private var inputText: String = "" var body: some View { VStack { TextField("텍스트를 입력하세요", text: $inputText) .textFieldStyle(PlainTextFieldStyle()) .foregroundColor(.blue) // 글자 컬러 .accentColor(.blue) .font(.system(size: 20, weight: .heavy, design: .default)) .background(RoundedRectangle(cornerRadius: 15).fill(Color.gray)) }.background(Color.white)..

2023. 7. 17. 14:34
개발/SWIFT 아이폰

SwiftUI TextField 기본 사용법

텍스트 필드 기본 사용법 struct ContentView: View { @State private var inputText: String = "" var editingChanged: (Bool) -> () = { editing in print("onEditingChanged: \(editing)") } var commit: () -> () = { print("onCommit") } var body: some View { VStack { TextField("텍스트를 입력하세요", text: $inputText, onEditingChanged: editingChanged, onCommit: commit) .foregroundColor(.white) // 글자 컬러 .background(Color.red)/..

2023. 7. 17. 14:17
개발/SWIFT 아이폰

SwiftUI 리스트 기본 스타일 변경

iOS 13.2부터 리스트의 기본 스타일이 InsetGroupedListStyle() 적용 List { Text("Item 1") Text("Item 2") Text("Item 3") }.listStyle(InsetGroupedListStyle()) 리스트 스타일을 GroupedListStyle()로 변경 List { Text("Item 1") Text("Item 2") Text("Item 3") }.listStyle(GroupedListStyle()) // To enable the inset style .environment(\.horizontalSizeClass, .regular) // To disable the inset style .environment(\.horizontalSizeClass, ...

2023. 7. 17. 12:30
개발/SWIFT 아이폰

SwiftUI 리스트 생성 시 외부 API 데이터

리스트 생성 시 외부 API로 데이터를 가져온다면 struct ContentView: View { @State private var items: [Item] = [] // 외부 API로부터 받아온 목록을 저장할 배열 var body: some View { VStack { List(items, id: \.id) { item in VStack(alignment: .leading) { Text(item.title) .font(.headline) Text(item.description) .font(.subheadline) .foregroundColor(.gray) } } .onAppear { // 외부 API로부터 목록을 가져와서 items 배열에 저장 fetchData() } } } func fetchData..

2023. 7. 17. 12:16
  • «
  • 1
  • ···
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • »

전체 카테고리

  • OVERPAY (58)
    • 개발 (47)
      • ANDROID 안드로이드 (16)
      • SWIFT 아이폰 (30)
      • 정보 (1)
    • 무료 소프트웨어 (3)
    • 정보 (6)
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

반응형

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote Copyright © OVERPAY All rights reserved. TistoryWhaleSkin3.4

티스토리툴바