본문 바로가기
[ios/tutorial] Core Animation 모든 것!! [ios/tutorial] Core Animation 모든 것!! 참고 : https://www.objc.io/issues/12-animations/animations-explained/ -Animation 을 수행하는 방법은 크게 2가지. 1. UIView 의 class method “animateWithDuration:” 을 사용하는 방법2. Core Animation 을 사용하는 방법. Simple Animation 이 아니라면 Core Animation 을 사용하는 것이 추천된다.훨씬 코드의 가독성이 좋고, 더 많은 기능을 제공한다.But, 더 많은 학습을 필요로 한다. 물론 애플의 권장사항은 할수만 있다면 항상 UIKit 에서 제공되는 Animation 을 사용하길 원한다. -Core Anima.. 2017. 11. 30.
[ios/reference] Advanced Animation Tricks [ios/reference] Advanced Animation Tricks https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html -Animation pause 를 위해서는 CAMediaTiming protocol 을 layer 에 전달하고, layer 의 animation speed 를 0.0 으로 설정하면 된다.이 speed 값이 non zero 값이 될 때까지 animation 은 pause 된다. ex)-(void)pauseLayer:(CALayer*)layer{ CFTimeInterval paus.. 2017. 11. 29.
[ios/tutorial] Implicit Animation [ios/tutorial] Implicit Animation -View 에 붙어 있지 않은 Layer property 들은 기본적으로 implicit animation 을 한다. -Implicit Animation 을 끄려면 다음과 같이 한다.[CATransaction begin];[CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions]; // property setting [CATransaction commit]; -아래와 같은 코드로 View 에 붙어있는 Layer 에도 Implicit animation 을 줄 수 있다.또한 standalone animation 의 implicit animatio.. 2017. 11. 28.
[ios] Umbrella Framework? Umbrella Header? [ios] Umbrella Framework? Umbrella Header? https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html -Umbrella Framework 는 표준 Framework 와 비슷하다.Umbrella Framework 는 header file 들을 include 하고 있다.그리고 subframework 들을 encapsulate 한다. -Umbrella framework 는 내부의 구현을 잘 숨겨서 필요한 interface 만 제공할 수 있고,precompiled header 를 사용해 build 도 더 빨리 할 수 있는 장점이 있.. 2017. 11. 27.
[ios/code snippet] Phone 인지 Pad 인지 검사하기 [ios/code snippet] Phone 인지 Pad 인지 검사하기 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/c/tdef/UIUserInterfaceIdiom UIUserInterfaceIdiom userInterfcae = [UIDevice currentDevice].userInterfaceIdiom;if ( userInterfcae == UIUserInterfaceIdiomPad ) { NSLog(@“This is Pad”);} else if ( userInterfcae == UIUserInterfaceIdiomPhone ) { NSLog(@“This is Phon.. 2017. 11. 26.
[ios] Layer Animation 완료 후 position 유지하기 [ios] Layer Animation 완료 후 position 유지하기 아래 2개 조합이면 animation 결과가 유지된다. animation.fillMode = kCAFillModeForwards; animation.removedOnCompletion = NO; animation 결과 유지, animation 유지, fillafter, fillmode, kCAFillModeForwards, layer animation, Position, removedOnCompletion, [ios] Layer Animation 완료 후 position 유지하기 2017. 11. 25.
[ios/reference] Layer Style Property Animations [ios/reference] Layer Style Property Animations https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/LayerStyleProperties/LayerStyleProperties.html -Geometry Properties bounds position frame anchorPoint cornerRadius transform zPosition -Background Properties backgroundColor backgroundFilters ( only OS X) -Layer Content contents contentsGravity masksToBounds .. 2017. 11. 24.
[ios/reference] Improving Animation Performance [ios/reference] Improving Animation Performance https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/ImprovingAnimationPerformance/ImprovingAnimationPerformance.html#//apple_ref/doc/uid/TP40004514-CH9-SW1 -가능하면 항상 Opaque Layer 를 사용하라. opaque property 를 YES 로 해놓으면 alpha channel 을 유지할 필요가 없음을 알게 된다. 그래서 blend 하는 로직을 타지 않아도 되서 rendering performance 가 좋아진다. 만약 c.. 2017. 11. 23.
[ios/reference] Animating Layer Content [ios/reference] Animating Layer Content https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/CreatingBasicAnimations/CreatingBasicAnimations.html -Animation 은 보통 그 요청이 끝날 때까지 지속된다.명시적으로 animation 을 끝내기 위해서는... removeAnimationForKey: 또는 removeAllAnimations 함수를 호출하면 된다. -Animation 을 멈추면, 원래의 현재값으로 돌아간다.만약 Animation 을 멈춘 시점에 그 값을 유지하려면, presentation tree 를 이용해서.. 2017. 11. 22.
반응형