전체 글

개발/아이오에스

ios] xcode app 다크모드 적용 끄기

시뮬레이터나 실제 디바이스에서 다크모드가 켜 있을 때 제작한 앱이 다크모드까지 디자인을 안한 경우 위 사진처럼 info.plist에서 UIUserInterfaceStyle

개발/아이오에스

swift] button 터치시 투명도 조절하기 (hover st..)

www.codegrepper.com/code-examples/swift/change+opacity+of+button+clicked+swift IBAction func keyPressed(_ sender: UIButton) { sender.alpha = 0.5 //Code should execute after 0.2 second delay. DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { //Bring's sender's opacity back up to fully opaque. sender.alpha = 1.0 } }

개발/아이오에스

swfit] UIbutton의 타이틀값 얻기 sender.currentTitle

@IBAction func clickButton(_ sender: UIButton){ print(sender.currentTitle) print(sender.title(for: .normal)) print(sender.titleLabel?.text) } sender.currentTitle

개발/아이오에스

swift] Photos 프레임워크

www.boostcourse.org/mo326/lecture/16867 iOS 앱 프로그래밍 부스트코스 무료 강의 www.boostcourse.org Photos 프레임워크는 iOS 및 macOS에서 사진 애플리케이션, 사진 확장 기능을 지원하는 클래스를 제공합니다 이 프레임워크를 사용하여 화면에 표시 및 재생할 에셋을 검색하고 이미지 또는 비디오를 편집하거나 앨범, 특별한 순간 및 iCloud 공유 앨범과 같은 에셋을 사용하여 작업할 수 있습니다. var fetchResult: PHFetchResult! Photos 프레임워크 모델 클래스 (PHAsset, PHAssetCollection, PHCollectionList)의 인스턴스는 사진 애플리케이션에서 에셋(이미지, 비디오, 라이브 포토), 에셋 컬..

개발/아이오에스

swift ] 다음 화면으로 데이터 전달하기

override func prepare(for segue: UIStoryboardSegue, sender: Any?) { guard let nextViewController: WeatherViewController = segue.destination as? WeatherViewController else { return } guard let cell: UITableViewCell = sender as? UITableViewCell else { return } nextViewController.country = cell.textLabel?.text } developer.apple.com/documentation/uikit/uiviewcontroller/1621490-prepare Apple Develope..

개발/아이오에스

swift 네비게이션바 배경색상 제목색상 변경 navigationController

self.navigationController?.navigationBar.barTintColor = .systemBlue // 배경색상 self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] // 타이틀 색상 테이블 뷰 셀 엑세서리 추가하기 let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: self.cellIdentifier, for: indexPath) cell.accessoryType = .disclosureIndicator // ">"

dev.jake
484jake