TableView 7

SwiftUI) 간단한 테이블뷰 만들기

import SwiftUI struct ContentView: View { var body: some View { NavigationView { List(posts) { post in Text(post.title) } .navigationTitle("H4X0R News") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } struct Post: Identifiable { //Identifiable: 순서 인식 가능하게 함 let id: String let title: String } let posts = [ Post(id: "1", title: "Hello"), Post..

RxSwift 제일 간단한 테이블뷰 만들기

RxSwift 제일 간단한 테이블뷰 만들기 without tableview 기본 메서드 (cellForRowAt, numberOfRowsInSection이 필요없음) import UIKit import RxSwift import RxCocoa class MainViewController: UIViewController, UITableViewDelegate { @IBOutlet weak var tableView: UITableView! //원래 tableViewItems = ["Item 1", "Item 2", "Item 3", "Item 4"]인데 이걸 Observable 시퀀스로 아래와 같이 변환 let tableViewItems = Observable.just(["Item 1", "Item 2", "..

iOS/RxSwift 2023.02.14

iOS swift tableview with section by snapkit programmatically

iOS swift tableview with section by snapkit programmatically https://magi82.github.io/implement-uitableview-programmatically-in-swift/ Swift Code로 UITableView 구현하기 – 마기의 개발 블로그 – 즐겁게 개발을 하고 싶은 욕심 많은 개발 안녕하세요. 마기입니다. 당분간 Swift 혹은 ios 관련 내용으로 포스팅할 예정입니다. 해외에는 ios 프로젝트에서 storyboard를 사용할지 xib를 사용할지 code로 구현할지에 대한 이슈가 엄청난 핫이슈 magi82.github.io https://ios-development.tistory.com/899 [iOS - swift] UITa..

2차 평가과제 중 알게된 것들 (테이블뷰 섹션 관련)

TableView Section뒤에 배경화면을 UIViewController의 배경화면으로 하고싶을 때 (비우고 싶은 경우) [self.tableView setBackgroundView:nil]; [self.tableView setBackgroundColor:[UIColor clearColor]]; https://stackoverflow.com/questions/18753411/uitableview-clear-background UITableView clear background I realize that iOS 7 has not officially been released and we should not discuss it BUT I am going crazy trying to figure out th..

tableview code로 구현하기

tableview code로 구현하기 https://shark-sea.kr/entry/iOS-TableView-Code%EB%A1%9C-%EA%B5%AC%ED%98%84%ED%95%98%EA%B8%B0 iOS :: TableView Code로 구현하기 안녕하세요! 상어입니다. 오늘은 전편에 이어 TableView를 Code로 구현하는 내용을 다뤄보겠습니다. 저는 개인적으로 Storyboard를 애용하기 때문에 code로 구현하는 일은 잘 없지만, 간혹 한번씩(드물 shark-sea.kr 글이 잘 쓰여있어서 퍼옴

iOS swift] tableView section 이름 붙이기 - titleForHeaderInSection

iOS swift] tableView section 이름 붙이기 (섹션마다 title이 있는 tableView) 키워드: titleForHeaderInSection https://calmone.tistory.com/entry/iOS-UIKit-in-Swift-4-section%EC%9C%BC%EB%A1%9C-%EB%82%98%EB%88%84%EC%96%B4%EC%A7%84-UITableView-%EB%A7%8C%EB%93%A4%EA%B8%B0 [iOS UIKit in Swift 4] section으로 나누어진 UITableView 만들기 section으로 나누어진 UITableView 만들기 UITableView를 2개의 section으로 나누어 iOS와 AOS의 버전을 나열해봤습니다. section의 ..