
SwiftSoup 설치는 다음 공식 readme를 참고하자. 우린 여기서 책 제목만 긁어오고자 한다. 해당 제목 element 우클릭 - [검사]를 눌러 위치를 확인하자. // // ViewController.swift // iosCrawling // // Created by YOONJONG on 2021/02/02. // import UIKit import SwiftSoup class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. crawl() } } func crawl(){ let url = URL(stri..

CollectionView 셀을 이용한 앱을 만들어보던 중 생긴 오류 Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key dateLabel.' 분명 셀에 대한 클래스도 잘 지정하고, Identifier도 잘 지정했고, 셀에 대한 swift 파일도 잘 작성했는데 발생한 오류라 당황스러웠다. 원인은 의외로 간단했다. 셀의 'Inherit Module From Target' 체크란을 체크해주니 해결되었다.

sender의 button의 class를 UIButton에서 내가 커스텀에 사용한 RoundButton으로 변경도 해보고 했지만, 계속 nil만 리턴한 오류. guard let numberValue = sender.titleLabel?.text else { return } print(numberValue) 로 수정하니 해결되었다. 왜 sender.title(for:)로 작성하면 nil이 발생하는지 원인은 미상이다. 나와 같은 문제를 해결한 게시글(https://stackoverflow.com/questions/70145242/how-to-get-the-current-title-of-a-button-in-swift)을 찾아보니 최근에 발생한 문제점인지 싶기도 하다.

IntrinsicContentSize The natural size for the receiving view, considering only properties of the view itself. = 뷰 자체 본질의 크기 UILabel, UIButton, UISwitch가 대표적 Contents 고유 사이즈 개념이 있는 것들이 있다. 크기가 결정되는 뷰이다. 이들은 다른 뷰들과의 제약에 의해 본래 컨텐츠 보다 늘어나거나(허깅으로 방지) 줄어들 수 있다(컴프레션 레지스터로방지). Content hugging 최대 크기에 대한 제한 = 이보다 작아질 수 있다. → 우선 순위 높은 뷰가 다른 뷰에 비해 작아진다. Compression resistance 최소 크기에 대한 제한 = 이보다 커질 수 있다. → 다..
- Total
- Today
- Yesterday
- IOS
- equaltosuperview
- BeautifulSoup
- UITest
- collectionViewCell
- 2024년
- 2023년
- http/1.1
- 클린 아키텍처
- Clean Architecture
- Info.plist
- 스위프트
- Autolayout
- XCTest
- CRAWL
- 웹모바일
- 네트워킹
- 부스트캠프
- dismiss
- 오토레이아웃
- Realm
- 유즈케이스
- snapkit
- IntrinsicContentSize
- swift
- KeyChain
- 회고
- Kotlin
- http/1
- CollectionView
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |