분류 전체보기188 [UIKit] RxSwift로 tableview만들기 Make tableview with RxSwift import UIKit import RxCocoa import RxSwift class ViewController: UIViewController { let tableView = UITableView() let disposeBag = DisposeBag() let items = Observable.just([ "first Item", "second", "third" ]) override func viewDidLoad() { super.viewDidLoad() tableView.frame = self.view.frame tableView.dataSource = nil tableView.delegate = nil tableView.register(UITabl.. 2023. 3. 22. [UIkit] Tableview 코드로 만들기 import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() // TableView 생성 및 Delegate, DataSource 설정 tableView = UITableView(frame: view.bounds, style: .plain) tableView.delegate = self tableView.dataSource = self // TableView Cell 등록 tableView.register(UITableViewCell.self, forCe.. 2023. 3. 21. [Swift] Icon 색과 크기 변경하는 방법 let locationButton: UIButton = { let button = UIButton(type: .system) let symbolConfiguration = UIImage.SymbolConfiguration(pointSize: 30, weight: .regular) let symbol = UIImage(systemName: "plus", withConfiguration: symbolConfiguration)?.withTintColor(.black, renderingMode: .alwaysOriginal) button.setImage(symbol, for: .normal) button.contentVerticalAlignment = .fill button.contentHorizontalAli.. 2023. 3. 21. [Swift] RXSwift로 UPDown 만들기 mvvm, rxswift, rxcocoa import UIKit import RxSwift import SnapKit import RxCocoa import UIKit class ViewController: UIViewController { var disposedBag = DisposeBag() let countViewModel = CountViewModel() func setBind() { //바인딩 countViewModel.count .bind(to: countLabel.rx.text) .disposed(by: disposedBag) //위로버튼 눌렀을때 바인딩 upButton.rx.tap .bind{ [weak self] in //print("gkdlgkld") self?.countViewMode.. 2023. 3. 21. [UIkit] 공공데이터 활용하기, serviceKey, Application_ERROR 해결 정리 : applicationError는 post요청하는 params에 문제가 있었다. 혹시 비슷한 에러를 찾기 위해 찾아온다면 문서를 잘 읽고 코드를 잘 보면 해결 됨! Alamofire로 통신하면 편함 https://github.com/Alamofire/Alamofire GitHub - Alamofire/Alamofire: Elegant HTTP Networking in Swift Elegant HTTP Networking in Swift. Contribute to Alamofire/Alamofire development by creating an account on GitHub. github.com 오늘의 리빙 포인트 : REST요청 할 때 인코딩을 하니, 인코딩된 값(API값)을 넘기면 안된다! .. 2023. 3. 14. [알고리즘] 2중 배열 정렬 방법 https://rldd.tistory.com/244 [Swift5] 2차원 배열 정렬하기 문법 tip! ✅ 이번 시간에는 2차원 배열 정렬하는 방법에 대해서 알아볼 예정이야 내가 생각하는 스위프트로 코딩테스트 준비의 최대 단점은 파이썬이나 C에 비해서 개인적으로 다차원 배열이나 딕셔너리 rldd.tistory.com 2023. 2. 28. 이전 1 ··· 24 25 26 27 28 29 30 ··· 32 다음