본문 바로가기
[Kotlin] Kotlin 의 숨겨진 비용 #3 [Kotlin] Kotlin 의 숨겨진 비용 #3 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-3-3bf6e0dbf0a4 Delegated property -class Example{ var p: String by Delegate()} property 에 delegate 를 사용할 경우에 해당 delegate 는 operator function 인 getValue 와 setValue 를 구현해야 한다.해당 function 들은 object instance 와 property metadata 를 받는다. public final class Example{ @NonNull private final Delegate p$delegate =.. 2018. 1. 18.
[ios] Constraint animation 주기 [ios] Constraint animation 주기 -간단하다.self.someConstraint.constant = -10; // 0.25 는 CABasicAnimation 의 Default Animation 값[UIView animateWithDuration:0.25 animations:^{ [self layoutIfNeeded];}]; animatewithduration, animation, constant, constraint, constraint animation, layoutIfNeeded, [ios] Constraint animation 주기 2017. 12. 19.
[Effective Java] 비트(bit) 필드 대신 EnumSet 을 사용하자. [Effective Java] 비트(bit) 필드 대신 EnumSet 을 사용하자. - 보통 비트 값을 constant 로 사용할 때 아래와 같이 int enum 패턴을 사용하여 각 상수에 2의 n승을 대입한다. // 비트 필드 public static final int STYLE_BOLD = 1 2016. 12. 26.
[iOS] keyboard type 바꾸기 [iOS] keyboard type 바꾸기 -UIKeyboardType enum 으로 다음과 같은 것들이 정의된다. typedef NS_ENUM(NSInteger, UIKeyboardType) { UIKeyboardTypeDefault, UIKeyboardTypeASCIICapable, UIKeyboardTypeNumbersAndPunctuation, UIKeyboardTypeURL, UIKeyboardTypeNumberPad, UIKeyboardTypePhonePad, UIKeyboardTypeNamePhonePad, UIKeyboardTypeEmailAddress, UIKeyboardTypeDecimalPad NS_ENUM_AVAILABLE_IOS(4_1), UIKeyboardTypeTwitter N.. 2016. 9. 19.
[iOS Study] 애니메이션 제어 [iOS Study] 애니메이션 제어 출처 : 아론 힐리가스의 iOS 프로그래밍 -애플 문서는 언제나 iOS 기술을 배우기에 좋은 출발점이다. -기본 애니메이션(basic animation) 은 시작값과 끝값 사이를 애니메이션으로 만든다. -[UIView animateWithDuration:0.5 animtations:^{ label.alpha = 1.0;}]; animateWithDuration:animations: 메소드는 즉시 반환한다.즉, 이 메소드는 애니메이션을 시작하지만 애니메이션이 완료되는 것을 기다리진 않는다. -UIView 에서 가장 간단한 블록 기반 애니메이션 메소드가 animateWithDuration:animations: 이다.이 메소드는 애니메이션이 수행되는 시간과 애니메이션을 적.. 2016. 3. 6.
[iOS Study] 터치 이벤트와 UIResponder [iOS Study] 터치 이벤트와 UIResponder 출처 : 아론 힐리가스의 iOS 프로그래밍 -UIView 는 UIResponder 의 하위 클래스로서 각각 다른 터치 이벤트를 처리할 네 개의 메소드를 재정의할 수 있다. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; -화면을 .. 2016. 2. 24.
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.
[VB6] Built-in Function 들에 대해 공부해보자. ( MsgBox, Input, Math 함수, Formating 함수, String 함수 ) Built-in Function 들에 대해 공부해보자. [이전강좌] Control 문들에 대해 공부해보자. ( If Else, Select, Do while, For문 ) Dialog Box 들 returnValue = MsgBox( PromptStr, StyleValue, Title ) StlyeValue Constant0 vbOkOnly 1 vbOkCancel 2 vbAbortRetryIgnore 3 vbYesNoCancel 4 vbYesNo 5 vbRetryCancel StyleValue 에는 다음의 값을 더해서, icon 도 함께 표시할 수 있다. StyleValue Constant 16 vbCritical 32 vbQuestion 48 vbExclamation 64 vbInformation Re.. 2013. 6. 5.
[VB6] 변수 정의와 Scope 에 대해 공부해보장. 변수 정의와 Scope 에 대해 공부해보장. [이전강좌] Data Type 과 Suffix Literal 변수 정의 변수 정의는 Dim 으로, DataType 정의는 As 로. Dim password As String 사실 VB 는 변수 정의 없이 변수를 사용할 수 있는데, 이 때는 Data type 이 자동으로 variant 가 된다.Variant 는 어떤 형태의 data 든 담을 수 있다. String 의 경우 fixed length 와 variable length 두가지 형태로 정의가 가능한데, 다른 변수와 같이 정의하면 variable length 이고, 다음과 같이 정의하면 fixed length 이다. Dim name as String * 10 // 10글자 길이의 string Scope 를 .. 2013. 6. 2.
반응형