본문 바로가기
[ios/reference] Core Animation Basics [ios/reference] Core Animation Basics https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/CoreAnimationBasics/CoreAnimationBasics.html#//apple_ref/doc/uid/TP40004514-CH2-SW3 -Prerequisite 로 앞의 글들을 읽어보길...앞의 글들에서 catch 하지 못한 부가 정보들만 정리[ios/reference] Core Animation -Core Animation 을 사용하지 않고, 변화에 대해서 drawRect: 에서 다시 그리는 방법도 있지만,이 방법은 MainThread 에서 그림을 그리기 때문에.. 2017. 11. 20.
[ios/reference] Core Animation [ios/reference] Core Animation https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514-CH1-SW1 -Core Animation 은 iOS, OS X 모두에 속하는 animation 에 대한 infra structure 이다. -몇 가지 설정만 해주면, 알아서 animation 을 만들어 수행한다.animation 에 대한 수행은 안쪽에서 알아서 hardware 가속 등을 사용해 rendering 한다. -Core Animation 은 UIKit/ AppKit 아래.. 2017. 11. 19.
[ios] xib 파일을 rendering 하는 custom view 만들기 [ios] xib 파일을 rendering 하는 custom view 만들기 참조 : https://developer.apple.com/library/ios/recipes/xcode_help-IB_objects_media/Chapters/CreatingaLiveViewofaCustomObject.html 1. UIView 의 subclass 를 만든다.2. header 의 @interface 선언 위에 IB_DESIGNABLE 을 붙인다. // interface builder 가 해당 view 를 그린다.3. xib 파일을 만들어 view 를 그린다.4. Custom Class 에 위에서 생성한 view 를 assign 해준다. @interface, assign, custom class, header, .. 2017. 11. 11.
[ios] UIView 에 대한 이야기 [ios] UIView 에 대한 이야기 참조 : https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/ -UIView 는 다른 View 를 가질 수 있다. -보통 Subview 는 superView 의 bound 에 clip 되지 않지만 clipsToBounds property 를 사용하면 clip 시킬 수 있다. -view 의 geometry 는 frame, bounds, 그리고 center property 에 의해 결정된다.frame 은 superview 기준의 position 과 size 를 결정할 때 사용된다.center 는 size 변화 없이 position 변경할 때 사용된다.bounds 는 view.. 2017. 11. 10.
[android] VSYNC & Choreographer - Butter Project [android] VSYNC & Choreographer - Butter Project http://developer.android.com/reference/android/view/Choreographer.htmlChoreographer - 발레 안무가 -API 16 ( Jelly Bean ) 부터 사용 가능하다. -animation, input 그리고 drawing timing 을 coordinate 한다. -choreographer 는 VSYNC pulse 타이밍에 event 를 받는다.그리고 이 시간에 다음 display frame 에 대한 작업을 하면 된다. -앱은 일반적으로 choreographer 와 간접적으로 작용한다.animation framework 나 view hierarchy 를 통해.. 2017. 9. 5.
[android] 특정 위치에 popup window 띄우기 [android] 특정 위치에 popup window 띄우기 http://frogermcs.github.io/InstaMaterial-concept-part-4-feed-context-menu/ -꼭 popup window 를 띄우지 않아도, LinearLayout 등을 통해서도 popup window 형태를 충분히 띄울 수 있다. -메뉴를 표시하는 LinearLayout 를 하나 만든다. -menu 를 표시하는 action 이 들어오면, 메뉴 view 를 만들고, ViewTreeObserver 에 addOnPreDrawListener 를 등록한다. -listener callback 에서는 먼저 pre draw listener 를 해지해주고, menu 의 위치를 잡아준다. -위치를 잡는것은, 기준점이 되.. 2017. 7. 12.
[android] LOS visibility change & ripple animation glitch (잔상문제) [android] LOS visibility change & ripple animation glitch (잔상문제) LOS 이상에서 버튼 클릭을 하면 기본적으로 ripple animation 이 발생한다.Animation 도중 visibility 를 gone 으로 만들었다가 나중에 visible 로 다시 만들면,gone 당시 진행중이던 ripple 이 남아있게 되서 visible 이 되는 순간 남아있던 ripple effect 가 보이게 되어 ugly 하다. 이것을 해결하려면..아래의 함수를 통해 해결할 수 있다!! ViewCompat.jumpDrawablesToCurrentState( View ); // examplemyButtonContainer.setVisibility(View.VISIBLE);Vi.. 2017. 5. 29.
[android] Custom view state 관리에 대한 내용. [android] Custom view state 관리에 대한 내용. -예를 들어 checked state 가 없는 view 에 checked state 를 추가하려면 다음과 같이 할 수 있다. - 우선 어떤 view 에 Checkable 이라는 interface 를 implement 시키고.. ( android 에 있는 interface ) public interface Checkable{ void setChecked(boolean checked); boolean isChecked(); void toggle();} - setChecked 함수에서 refreshDrawableState() 를 호출하면, int[] onCreateDrawableState(int extraSpace) 가 불린다. privat.. 2017. 5. 23.
[android] ListView 에서 RecyclerView 로 migration 하세요. [android] ListView 에서 RecyclerView 로 migration 하세요. http://andraskindler.com/2014/11/22/migrating-to-recyclerview/ - Google 에서도 RecyclerView 을 Support library 에 넣으면서 ListView 를 대체하려는 움직임을 보이고 있다. RecyclerView 는 새롭고, 효율적이고, customize 하기에도 좋다. ListView 뿐만 아니라 GridView, StaggeredGridView, ExpandableListView 역시 모두 migration 가능하다. RecyclerView and LayoutManager RecyclerView 는 제한된 수의 window 를 이용하여 lar.. 2017. 4. 13.
반응형