
swfit] UIbutton의 타이틀값 얻기 sender.currentTitle
@IBAction func clickButton(_ sender: UIButton){ print(sender.currentTitle) print(sender.title(for: .normal)) print(sender.titleLabel?.text) } sender.currentTitle
@IBAction func clickButton(_ sender: UIButton){ print(sender.currentTitle) print(sender.title(for: .normal)) print(sender.titleLabel?.text) } sender.currentTitle
www.boostcourse.org/mo326/lecture/16867 iOS 앱 프로그래밍 부스트코스 무료 강의 www.boostcourse.org Photos 프레임워크는 iOS 및 macOS에서 사진 애플리케이션, 사진 확장 기능을 지원하는 클래스를 제공합니다 이 프레임워크를 사용하여 화면에 표시 및 재생할 에셋을 검색하고 이미지 또는 비디오를 편집하거나 앨범, 특별한 순간 및 iCloud 공유 앨범과 같은 에셋을 사용하여 작업할 수 있습니다. var fetchResult: PHFetchResult! Photos 프레임워크 모델 클래스 (PHAsset, PHAssetCollection, PHCollectionList)의 인스턴스는 사진 애플리케이션에서 에셋(이미지, 비디오, 라이브 포토), 에셋 컬..
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..
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 // ">"
stackoverflow.com/questions/24171857/implementing-uitextfielddelegate-with-swift Implementing UITextFieldDelegate with Swift I have my ViewController class which implements UITextFieldDelegate. I have no auto complete for the funcs such as textFieldShouldBeginEditing. Is this a bug in XCode 6? Here's my class implemen... stackoverflow.com UITextFieldDelegate .. func textFieldDidBeginEditing(_tex..
import Foundation class UserInformation { static let sharedData: UserInformation = UserInformation() var phoneNumber: String? //전화번호 var dateValue: String? //달력 값 var userId: String? // ID 값 } UserInformation.swift - > 싱글톤 @IBAction func touchBeforeButton(_ sender: Any) { UserInformation.sharedData.dateValue = self.dateLabel.text UserInformation.sharedData.phoneNumber = self.phoneNumber.text } U..