-
IOS 공부 시작 2017. 07. 1 ~
-
공부 언어 : Objective-C , swift
-
IOS Base Study
- Light the candle App Study
- MVC patternator
- property
- Universal Application Light the Candle을 Universal Application 으로 변경
This is Study Room Objective-C , swift language Study Room
IOS 공부 시작 2017. 07. 1 ~
공부 언어 : Objective-C , swift
IOS Base Study
Light the candle Application access method changed property Code
@interface CandleModel : NSObject -> NSObject 최상의 객체 상속을 위해서 Interface 정의
property 선언하면 알아서 멤버 변수 선언 및 get set 정의부분 선언 할시 자동으로 구현부분 생성됨 모던 런타임에서만
@Property 사용 이득 -> synthesize 를 이용하여 get set 자동으로 정의
기존 old 방식의 access method 선언
1 외부에서 접근할수 있도록 access method 선언 (getter setter 추가)
- (UIImage *) imageCandleOn; // getter
- (void) setImageCnadleOn:(UIImage *)newImage; // setter
하지만 여기서 property 로 선언하면 다음과 같음
@Property (nonatomic, strong) UIImage *ImageCadlOn ; // getter , setter 선언
First type option @Property (type, type)
Second type option
weak , retain , copy , assing , strong : copy를 제외한 나머지는 동일
Copy 경우는 Copy set에 대해서 인자값이 넘어오는 인자에대해서 Copy 수행
retain = strong , assing = strong
get Name 옵션 getter = name setter = name
@Property (nonatomic, strong, getter = name , setter = name) UIImage *ImageCadlOn ; // getter , setter 선언
getter만 만들경우 옵션 readonly
@Property (nonatomic, readonly, getter = name) UIImage *ImageCadlOn ; // getter , setter 선언
구현 부분
//@synthesize ImageCandlOn; 선언 하면 끝 하지만 이마저도 ios버전이 업데이트 후 자동으로 구현 되므로 필요 없음 하지만 개인이 필요시 수정이 필요하다면
||- (UIImage *) imageCandleOn
{
return imageCandleOn;
}
-(void) setImageCnadleOn:(UIImage *)newImage
{
imageCandleOn = newImage;
}
이런식으로 수동으로 자기가 만들어서 사용할 수 도 있다.
- 자료출저
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.