본문 바로가기
[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] VSYNC 가 뭐하는 녀석인지 간단히 이야기하면? [android] VSYNC 가 뭐하는 녀석인지 간단히 이야기하면? https://www.youtube.com/watch?v=1iaHxmfZGGchttps://nayaneshguptetechstuff.wordpress.com/2014/07/01/what-is-vsyc-in-android/ -VSYNC 는 Vertical Synchronization 을 이야기한다. -Android 4.1 에 등장한 것으로 Project Butter ( UI 부드럽게 ) 에 나온 방법이다. -VSYNC 는 kernel 에서 fixed interval 로 계속 event 가 오는 것을 이야기한다.animation 이나 window drawing 등이 VSYNC interval 에 맞춰서 진행된다. -GPU 의 fps 와 De.. 2017. 8. 1.
[android] Circular Reveal 만들기 [android] Circular Reveal 만들기 http://frogermcs.github.io/InstaMaterial-concept-part-6-user-profile/ -Circular reveal 을 만드는 방법은 여러가지가 있다. -ViewAnimationUtils.createCircularReveal() 은 Render thread 통해 animation 되기 때문에 Lollipop 이전 단말에서는 사용할 수 없는 방법이다.하지만 Lollipop 이라면 가장 간단한 방법이다.[android] CircularRevealEffect Basic Simple Example -https://github.com/ozodrukh/CircularReveal 위의 링크는 Ginger 이상에서 사용할 수 .. 2017. 7. 14.
[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] list view 의 아이템 하나씩 나타나는 animation 효과 주기 [android] list view 의 아이템 하나씩 나타나는 animation 효과 주기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -// view 는 list의 itemViewview.setTranslationY(100); // 원래 등장하는 위치보다 조금 더 내려주고..view.setAlpha(0.f); // visibility 를 꺼준 후..view.animate() .translationY(0) .alpha(1.f) .setStartDelay(delayEnterAnimation ? 20 * (position) : 0) // position 마다 시간차를 조금 주고.. .s.. 2017. 7. 11.
[android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 [android] click 위치로부터 화면(Activity) 전개하는 animation 넣기 http://frogermcs.github.io/Instagram-with-Material-Design-concept-part-2-Comments-transition/ -y 값을 새로 open 되는 Activity 에 전달한다. -Activity 의 theme 에 background transparent 를 넣고, root view 를 scaleY 로 0.1f 정도 놓는다. -onCreate() 단계에서 scaleY 를 1.f, pivotY 를 전달받은 값, duration 을 200 정도로 설정한 animation 을 root view 에 주면 된다. activity, Android, animation, ba.. 2017. 7. 10.
[android] TextSwitcher ( from API level 1 ) [android] TextSwitcher ( from API level 1 ) http://developer.android.com/reference/android/widget/TextSwitcher.html -TextView 들만을 child 로 가지는 ViewGroup 이다.Label 을 animation 하는 데 유용하다.setText 가 불릴때마다 animation 을 해서 현재 text 를 out 시키고, 새로운 text 를 in 시킨다. -inAnimation 과 outAnimation 을 지정하여 사용한다. -setText 는 animation 을 하지만, setCurrentText 를 하면 현재 보여지고 있는 text 를 그냥 update 하기 때문에 animation 이 없다. -TextS.. 2017. 7. 9.
[iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) [iOS Study] 병렬 프로그래밍 가이드 ( dispatch source ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html#//apple_ref/doc/uid/TP40008091-CH103-SW1 About dispatch source -dispatch source 는 low-level system event 를 처리하기 위한 data type 이다. -Timer dispatch source 는 주기적인 noti 를 만든다. -Signal dispatch source 는 UNIX signal 이 도착하면 not.. 2017. 7. 3.
반응형