[iOS] 7월 26일 (월) 개발 일지
1. Scroll Content View 팁 Scroll View로 만들어야 하는 걸 잊고, safe area에 모든 Constraint를 설정했을 때? 새로운 UIView를 만들어서 safe area와 leading, trailing, top, bottom 모두 맞추고 safe area에 걸려 있는 constraint를 그 새로운 UIView로 바꿔준다.
1. Scroll Content View 팁 Scroll View로 만들어야 하는 걸 잊고, safe area에 모든 Constraint를 설정했을 때? 새로운 UIView를 만들어서 safe area와 leading, trailing, top, bottom 모두 맞추고 safe area에 걸려 있는 constraint를 그 새로운 UIView로 바꿔준다.
1. gesture 추가 특정 UIView를 눌렀을 때 동작을 추가해주고 싶은 상황에서 다음을 이용한다. 참고 let gesture = UITapGestureRecognizer(target: self, action: #selector(self.checkAction)) self.myView.addGestureRecognizer(gesture) @objc func checkAction(sender : UITapGestureRecognizer) { // Do what you want } 2. open safari 코드는 매우 단순하다. 참고 if let url = URL(string: "https://www.hackingwithswift.com") { UIApplication.shared.open(url) }..
import UIKit class ViewController: UITableViewController { let persons = ["Robert", "Peter", "Dave"] override func viewDidLoad() { super.viewDidLoad() } // MARK: 1번. @IBSegueAction private func showPerson(coder: NSCoder, sender: Any?, segueIdentifier: String?) -> PersonViewController? { guard let indexPath = tableView.indexPathForSelectedRow else { fatalError("Nothing selected!") } return Person..
1. ScrollView의 Paging Enabled 이걸로 Swipe Button X Page 구현 중이다. 2. ScrollView 마스터 동적 높이를 어떻게 구현하지 ? 싶었는데, https://stackoverflow.com/a/50944427 그냥 쉽게 생각하면 돼. SubView의 각각 아이템들을 SubView와 leading, trailing, top, bottom 모두 맞춰주면 돼. 3. An internal error occurred. editing functionality may be limited. 갑자기 스토리 보드 화면이 다 검은색으로 나옴. 검색해보니 Project -> Clean Build Folder 후 Xcode 재실행 하면 된다. 4. UILabel Storyboard상에..