분류 전체보기 (161) 썸네일형 리스트형 ios] 에러해결 - command phasescriptexecution failed with a nonzero exit code pod 라이브러리를 재설치 해보고 클린빌드도 해보았지만 동일했다. 해당 앱의 타겟에서 Run Script를 삭제하니 문제가 해결되었다. - 스크립트는 입력 및 출력 파일이 제공되지 않을 때 항상 실행되기 때문에 - pod을 사용하는 경우 추가 실행되는 스크립트는 필요하지 않 -음 https://stackoverflow.com/questions/53289524/xcode-10-2-1-command-phasescriptexecution-failed-with-a-nonzero-exit-code swift]앱에서 디바이스 환경설정 - 해당 앱 알림 설정 창 화면에 띄우는 방법 UNUserNotificationCenter.current().getNotificationSettings { (settings) in guard settings.authorizationStatus == .authorized else{ let alert = UIAlertController(title: "알림", message: "기기 내 [설정]>[앱 이름]>[알림]에서\n알림을 허용해주세요.", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "취소", style: .cancel, handler: nil)) alert.addAction(UIAlertAction(title: "확인", style: .default, handler: { _ in D.. swift] 앱 최초 실행 시 push 설정 1회성 처리 UserDefaults //앱 최초 실행 시 push 설정(푸쉬알림, 광고성 정보 수신동의 on) 1회성 func isFirstPush() -> (Bool) { let isBool = UserDefaults.standard.bool(forKey: UDataKey.InitPush) if !isBool { UserDefaults.standard.set(true, forKey: UDataKey.InitPush) } return isBool } swift] 업데이트시 마이그레이션을 위한 버전 체크 let savedVersion = UserDefaults.standard.value(forKey: "AppVersion") as? String ?? "0.0.0" if savedVersion.compare(version: "2.7.0") == .orderedAscending { //앞에 savedVersion가 뒤에 버전보다 작으면 여기 if문이 동작한다 } orderedAscending을 사용해서 2.7.3 < 2.7.10이 더 크다는 것을 체크할 수 있다. swift] UIView에 background에 image 파일 적용하기 let img = UIImage(named: "navi_bg") view.backgroundColor = UIColor(patternImage: img!) swift] SPM 만들기 - UIImage에 module의 image 선언하기 처음에는 이미지이터럴을 사용해서 선언해야겠다는 생각을 했지만 이미지이터럴은 해당 프로젝트의 번들에 있는 이미지를 참조하기 때문에 원하는 이미지를 불러 올 수 없었다. Package.swift에서 해당 타겟에 .target( name: "StudyPlan", dependencies:[], path: "StudyPlan/Sources", resources: [.process("Resources")] ) 으로 리소스를 선언해준다. 해당 리소스 폴더안에 Assets.xcassets을 넣어준다. listEditBtn.setImage(UIImage(named: "AlarmCal_btn_cal_delete", in: .module, compatibleWith: nil), for: .normal) 이 처럼 UIImag.. swift] UIbutton의 UIimage 색상변경하기 https://stackoverflow.com/questions/27163171/change-color-of-png-in-buttons-ios Change color of png in buttons - ios I've got a set of icons that I've created that are transparent white PNGs: And what I'd like to do is be able to tint them to other colors. Such as blue, grey, etc. I've noticed that 'clicked/ta... stackoverflow.com btn.setImage(name: "testImage", for: .normal) btn.setImageTintCol.. swift] scrollview안에서 uibutton - 액션이(touchupInside) 먹히지 않음 노란색 / 초록색이 UI button이고 scrollView - systemRed 이고 스크롤뷰안에 있는 뷰가 viewInScroll 이고 viewInScroll 안에 버튼과 달력 UI가 있다. viewInScroll의 높이가 높아지면 스크롤이 작동을 하도록 구현을 했다. 이 달력 UI를 만들면서 해당 버튼을 테스트해봤지만 버튼의 액션이 작동하지 않았다. UI를 그릴 때가 문제인가? addTarget을 잘못 선언했나? UIbutton을 lazy var 형태로 바꿔보며... 고생을 많이 했다... 이런저런 시도를 다 해봤지만 작동하지 않아 scrollView를 의심을 해봤다. 결론은 scrollView안에 존재하는 UIView인 viewInScroll의 높이, bottom제약이 걸려있지 않아 해당 버튼이 .. 이전 1 ··· 9 10 11 12 13 14 15 ··· 21 다음