본문 바로가기

2017/06

[iOS] UITableView의 footerView 변경 - height, background color override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { if (section == 특정 위치) { return 85 } else { return 0 } } override func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int) { view.tintColor = UIColor.clear } 위와 같이 소스를 오버라이딩 받아서 변경 해주시면 됩니다.참고하세요. 더보기
[iOS] Kingfisher 이미지 다운로드시, Authentication with NSURLCredential 이건 혹시, 테스트 서버에 접근 할 때, SSL 인증을 통과 시키고자 하시는 분들에게 도움을 드리고자 공유 합니다.iOS 출시를 위한 서버로 접근은 이 코드를 적용 시켜서는 안됩니다. 먼저 , .plist에 예외 처리 설정을 추가 합니다. NSAppTransportSecurityNSAllowsArbitraryLoads 우선, Kingfisher wiki에 SSL 인증과 관련 해서 아래와 같은 내용이 있다. Modify a request before sendinglet modifier = AnyModifier { request in var r = request r.setValue("", forHTTPHeaderField: "Access-Token") return r } imageView.kf.setImag.. 더보기
[iOS] UIWebView 에서 request시 SSL 인증 제외 이건 혹시, 테스트 서버에 접근 할 때, SSL 인증을 통과 시키고자 하시는 분들에게 도움을 드리고자 공유 합니다.iOS 출시를 위한 서버로 접근은 이 코드를 적용 시켜서는 안됩니다. 먼저 , .plist에 예외 처리 설정을 추가 합니다. NSAppTransportSecurityNSAllowsArbitraryLoads 위와 같이 설정을 추가 하셨으면 아래와 같이 소스를 변경 시켜 보세요.Swift 3.0에서는 아래 Step 7부분만 바꿔주시면 됩니다. Finally got the answer as :Step 1 >> import SafariServicesStep 2 >> Use NSURLConnectionDelegate with your ViewController i.e.class ViewControll.. 더보기
[Android] image-chooser-library FileUriExposedException 앱에서 카메라나 이미지 파일 접근을 할 때 아래 Library를 사용하시는 분들이 있으실 겁니다. https://github.com/coomar2841/image-chooser-library 위 라이브러리를 사용했는데 아래와 같은 에러가 발생 할 경우가 있습니다. FileUriExposedException: android.os.FileUriExposedException: file:///storage/emulated/0/AppName/AppName%20Pictures/061aafec-0acd-488d-b8b0-c7d5fb8c152a.jpg exposed beyond app through ClipData.Item.getUri() 위와 같이 FileUriExposedException 에러가 발생 한다.어떻게 .. 더보기
[iOS] 키보드 강제로 내리기 12345@IBAction func 특정이벤트 메소드(_ sender: AnyObject) { // sender가 UITextView 이거나 UITextField 일경우 // 그렇지 않을 경우 sender를 UITextView나 UITextField로 변경 해주세요. _ = sender.resignFirstResponder()}Colored by Color Scriptercs 위와 같이 UITextView 나 UITextField 에 resignFirstResponder 함수를 호출 하면 된다. 참고 : http://www.techotopia.com/index.php/Writing_iOS_7_Code_to_Hide_the_Keyboard 더보기
[iOS][Alamofire] NSURLSession/NSURLConnection HTTP load failed Https 도메인을 연결하기 위해선 SSL 인증이 필요하다.이를 제대로 설정 하지 않으면 아래 와 같은 이슈를 보게 되는데요. NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843 참고로 -9843 에러가 어떤 에러 인지 알고 싶으신 분들은 아래 사이트 들어가보시면 됩니다.에러 번호 별로 설명이 되어 있습니다. https://gist.github.com/ubergoob/04a981caa92d766a7f37f59848b6bc07 위 에러가 발생하면 맨 처음 plist에서 설정을 변경 합니다.아래 내용을 참고 하시면 되겠습니다. 2개의 방법이 있는데, 전체의 HTTP를 허용하는 방법과 도메인마다 설정해서 허용하는 방법이 있.. 더보기
[Android] SSL Disable 시키기 (Retrofit2, OkHttp3) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384private RetrofitBuilder(Context context, String url) { builder = new Retrofit.Builder() .baseUrl(url) .addConverterFactory(GsonConverterFactory.create()) .client(getUnsafeOkHttpClient(context, token, SysUtils.getVersionName(context))) .bui.. 더보기
[Android] missing translation error apk를 release 시키는 missing translation error 발생 할때가 있다. AppName 그럴땐 위 소스와 같이 resource 태그에 2줄만 추가 하면 된다. 참고로 모든 strings.xml 파일에 2줄을 추가 해야만 한다.그렇지 않으면 계속 에러가 발생 할 것이다. 다른 방법을 원하시는분들은 아래 블로그를 참고 하세요.출처 : https://blog.asamaru.net/2015/11/05/android-is-not-translated-in-dot-dot-dot-lint-error/ 더보기