본문 바로가기

2017/08

[2018.08.22] 오늘의 한줄 ## 무지는 잘못된 것이 아니다. 오픈 마인드를 가지고 받아들이는 태도가 더 중요하다. 내가 6~7년간 개발하면서 느낀 점... 이제 검색 하면 왠만한 건 다 나온다.나보다 잘하는 사람은 넘처 난다.변화는 너무 빠르고, 배워야 할 건 넘처 난다. 그걸 다 배울려고?모든 걸 니 머리 속에 넣을 수 있다고?방금 내가 읽은 글도 못 외우는데? 이젠 지식을 가지려고 하지 말고,지혜를 가지려고 노력하자. 답을 얻을려고 하지 말고,함께 공감을 찾아 나가자. 더보기
[Android] Can not perform this action after onSaveInstanceState Fragment를 이동할때 아래와 같은 illegalStateException이 발생할 때가 있다. Fatal Exception: java.lang.IllegalStateExceptionCan not perform this action after onSaveInstanceState 이건 테스트할때 잘 발생하지 않는 이슈라 그냥 넘기기 쉽지만,참고해서 코딩하는 것도 나쁘지 않아 보인다. 이건 Exception은 Activity에서 onSaveInstanceState 함수를 호출된 상태에서 commit 함수를 호출 했을때발생한다고 한다. 1. Activity1 onActivityCreated 에서 commit 호출2. Activity2 로 전환3. Activity1에서 onSaveInstanceState 호.. 더보기
[Android] FileProvider :: android.os.FileUriExposedException File 경로를 Uri로 변경하고자 할 경우 아래와 같이 이용한다. Uri.parse(File 경로) 앱 내부로 이용하는 것은 문제가 없지만,MediaPlayer나 Intent로써 다른 앱으로 값을 전달하고자 할 경우,아래와 같은 Exception이 발생한다. android.os.FileUriExposedException 이 Exception은build.gradle에 targetSdkVersion이 24 이상으로 설정 되어 있을 경우 발생 한다. 그 이유는 앱과 앱간의 파일 공유를 진행할 시, 보안이 강화 되었기 때문이다.이 문제를 해결하기 위해선 FileProvider를 이용하여 임시 권한을 할당해줘야 한다. 1. res/xml/provider_paths.xml xml을 통하여 권한을 주고자 하는 폴더.. 더보기
[iOS] UIScrollView 이동 import Foundation extension UIScrollView { // Scroll to a specific view so that it's top is at the top our scrollview func scrollToView(view:UIView) { if let origin = view.superview { // Get the Y position of your child view let childStartPoint = origin.convert(view.frame.origin, to: self) let bottomOffset = scrollBottomOffset() if (childStartPoint.y > bottomOffset.y) { setContentOffset(bottomOf.. 더보기