본문 바로가기
[android] 추가된 유용한 annotations [android] 추가된 유용한 annotations http://tools.android.com/tech-docs/support-annotationshttps://developer.android.com/reference/android/support/annotation/package-summary.html -Android support library 19.1 version 에서 annotation 들을 추가했다. -이 녀석을 사용하려면 gradle 에 다음을 추가해야 한다. compile ‘com.android.support:support-annotations:20.0.0’ 여기서는 크게 3가지 형태의 annotation 을 제공한다. 1. Nullness annotattions2. Resource ty.. 2017. 8. 2.
[Kotlin Tutorial] Kotlin 기초 #2 - Chap2. Kotlin basics [Kotlin Tutorial] Kotlin 기초 #2 - Chap2. Kotlin basics 참조 : Kotlin in Action 2.4. Iterating over things: "While" and "For" loops -Kotlin 에서 for loop 은 for-each loop 하나밖에 없다. 2.4.1. The “while” loop -Java 와 동일 2.4.2. Iterating over numbers: ranges and progressions -일반적인 for loop 를 쓰려면 range 를 쓰면 된다.Range 는 closed, inclusive 하다 즉 아래의 예에서는 1과 10 모두를 포함한다.val oneToTen = 1..10 -val hundredToOneWithSte.. 2017. 7. 25.
[Kotlin Tutorial] Kotlin 기초 #1 - Chap2. Kotlin basics [Kotlin Tutorial] Kotlin 기초 #1 - Chap2. Kotlin basics 참조 : Kotlin in Action 2.1. Basic elements : Functions and variables 2.1.1. Hello, world! -fun main(args: Array){ println(“Hello, world!”)} fun 는 function 을 정의하는 keywordtype 은 variable 이름 다음에 옴function이 class 정의 안에 있지 않아도 된다Array 가 class 이다 ( Java 는 아니징 ) -> Kotlin 에서는 모든 것이 Object 이다System.out.println 대신 println; (semicolon) 넣을 필요 없다 ( option.. 2017. 7. 25.
[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.
[iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) [iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationObjects/OperationObjects.html#//apple_ref/doc/uid/TP40008091-CH101-SW1 Operation Object 에 대한 이야기 -Operation object 는 NSOperation class 의 인스턴스를 이야기한다.NSOperation class 는 abstract base class 로 subclass 를 구현해야 한다. -NSInvocationOperation 과 NSBlock.. 2017. 7. 2.
[iOS Study] 병렬 프로그래밍 가이드 ( 병렬 앱 디자인 ) [iOS Study] 병렬 프로그래밍 가이드 ( 병렬 앱 디자인 ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/ConcurrencyandApplicationDesign/ConcurrencyandApplicationDesign.html#//apple_ref/doc/uid/TP40008091-CH100-SW1 -전통적 방법으로의 복수개의 코어를 사용하는 방법은 여러개의 thread 를 만들어 사용하는 것이다.그러나 thread 를 사용한 코드는 scale 측면에서 좋지 않다.core 가 처리하기 좋은 thread 의 갯수를 아는 것도 쉽지 않고, thread 들을 효율적으.. 2017. 7. 1.
Objective-C 의 기본 ( Basic Objective-C ) Object-C 의 기본 ( Basic Objective-C ) 출처 : http://www.tutorialspoint.com/objective_c/ > - OOP 언어로 Smalltalk-style 을 C 언어 에 가미한 언어이다. Apple 의 OSX 와 iOS 에서 공식적으로 사용되는 언어이다. > - Object-C 는 OOP 의 4가지 조건 ( Encapsulation, Data hiding, Inheritance, Polymorphism ) 을 모두 만족시키는 언어이다. - Foundation Framework 는 아래 명시된 기능들을 비롯해 많은 기능을 제공한다. * NSArray, NSDictionary, NSSet 과 같은 data type 을 제공 * file, string 등 많은 u.. 2015. 6. 16.
[android air] Activity lifecycle on the flash ( onResume, onPause, onStart, onStop ) [android air] Activity lifecycle on the flash ( onResume, onPause, onStart, onStop ) NativeApplication.nativeApplication.addEventListener( Event.ACTIVATE, onStart );NativeApplication.nativeApplication.addEventListener( Event.DEACTIVATE, onStop ); function onStart( e : Event ){// Do sth..} function onStop ( e : Event ){// Do sth..} activate, addEventListener, android activity lifecycle, Callback,.. 2014. 5. 7.
[android] ~Jelly Bean WebView vs. Kitkat WebView. [android] ~Jelly Bean WebView vs. Kitkat WebView. http://stefanodacchille.github.io/blog/2014/02/23/webview-explorations/ Hit test result. WebView 에서 어떤 element 를 touch 했을 경우,WebView.getHitTestResult() 를 호출하면 hitTestResult object 가 return 된다. HitTestResult 에는 element type 과 url 값이 들어있다.예를 들어 tag 를 touch 했을 때는 WebView.HitTestResult.SRC_ANCHOR_TYPE 이 type 으로 return 된다. 기존 WebView 는 이 녀석이 지원하지 않는 e.. 2014. 4. 10.
반응형