외규장각 도서 환수 모금 캠페인

'앱'에 해당되는 글 2건

  1. 2010.08.05 소스 완전 사이트
  2. 2010.04.06 Objective - C 기본 문법 총정리

<push notification service 관련 provider>

http://code.google.com/p/apns-php/


<web 게시판과 연동>

http://code.google.com/p/cozymood/


http://cocoadev.tistory.com/#recentTrackback에서 공개한 내용임.

      *  이미지 편집 함수 모음( 스케일, 회전, crop )

  • 다양한 UI 구현
  • 테이블뷰셀 커스터마이징
  • HTTP GET/POST 요청
  • XML 파싱
  • 사진 앨범, 카메라, 지도 이미지 접근
  • 맵뷰 위치정보
  • 푸시 노티피케이션


<여러 UI 모음: photo viewer, etc>

http://github.com/facebook/three20 (초기에는 facebook 어플이었으나 현재는 여러 UI 모음으로 바뀜 )


<map>

http://code.google.com/p/route-me/


<E-mail>

http://code.google.com/p/remail-iphone/

http://code.google.com/p/skpsmtpmessage/

 

<그래프>

http://code.google.com/p/core-plot/

 

<달력>

http://ved-dimensions.blogspot.com/2009/04/iphone-development-creating-native_09.html


<sqlite>

http://code.google.com/p/pldatabase/ (BSD license)

http://code.google.com/p/flycode/source/checkout  (class rapper)


<계산기>

http://code.google.com/p/hpcalc-iphone/ (GPL V2 license)


<트위터 클라이언트>

http://github.com/blog/329-natsuliphone-iphone-twitter-client

http://code.google.com/p/tweetero/


<facebook>

http://github.com/facebook/facebook-iphone-sdk


<rss reader>

http://code.google.com/p/iphone-simple-rss-aggregator/


<ebook reader>

http://code.google.com/p/iphoneebooks/


<blog>

http://iphone.wordpress.org/


<백업, 동기화>

http://www.funambol.com/solutions/iphone.php

http://code.google.com/p/gris/ (구글 리더 동기화)


<time tracking>

http://github.com/freshbooks-addons/freshbooks-iphone-project


<게임>

http://code.google.com/p/cocos2d-iphone/

http://code.google.com/p/tris/ (테트리스)

http://code.google.com/p/mintgostop/ (고스톱)

http://www.joystiq.com/2009/03/24/carmack-releases-open-source-wolfenstein-for-iphone/

 

<google toolbox>

http://code.google.com/p/google-toolbox-for-mac/


<택배>

http://kldp.net/projects/taekbae/src

 

<이미지 프로세싱>

http://code.google.com/p/simple-iphone-image-processing/


<증강현실>

http://www.iphonear.org/


<coverflow 대체 구현>

http://apparentlogic.com/openflow/

http://www.chaosinmotion.com/flowcover.m (매가박스 어플에서 참고함)


<정규표현식 라이브러리>

http://blog.mro.name/2009/09/cocoa-wrapped-regexh/

http://regexkit.sourceforge.net/RegexKitLite/


<라이브러리 : JSON, DOM XML, Google Data APIs, Twitter, Flick, Game Engines, Unit Testr>

http://www.codingventures.com/2008/12/useful-open-source-libraries-for-iphone-development/


<기타>

http://open.iphonedev.com/

http://joehewitt.com/post/the-three20-project/

[출처] iPhone Open Source 모음  (맥부기 아이폰(iPhone)OS 개발자모임) |작성자 낙수

Posted by 닉네임영역
,

1. Messages

메시지 전송할 때 사용됩니다. ”[ ]”로 싸서 표현합니다.

[receiver message]

receiver는 변수, 자기자신, 클래스 이름등 사용 가능하며  메시지는 receiver에게 무엇이든 전달할 수 있다.

 

2. Defined Types

Objective-C에서 사용되는 주요 타입은 “objc/objc.h”에 정의되어 있다.

타입

정의

id

객체를 가리킴. 인스턴스에 대한 포인터

Class

클래스 자체에 대한 포인터

SEL

메소드의 이름을 선택하기 위한 선택자, 이름과 모든 콜론(;)을 포함

IMP

id를 리턴하는 메소드의 구현부에 대한 포인터

BOOL

이진값. YES 또는 NO

Nill

Null object

 

Preprocessor Directive(전처리기 지시자)

#import

.h 헤더파일을 import

#include

.h 헤더파일을 include(#import와는 달리 여러 번 수행됨)

//

주석(comment)

 

3. Compiler Directive

Complier 지시자는 “@”로 시작한다.

 

다음은 classes, categories, and protocols의 선언과 정의에 쓰이는 지시자이다.

Directive

정의

@interface

class 또는 카테고리 interface의 선언 시작

@implementation

class 또는 카테고리의 선언 시작

@protocol

형식 프토토콜 선언 시작

@end

Class, category 또는 protocol의 선언/정의를 끝낸다.


다음은 instance변수들의 visibility를 설명한 상호 배타적인 지시자이다.

Directive

정의

@private

instance변수의 범위를 그것이 선언된 class로 한정한다.

@protected

instance변수의 범위를 선언되고, 상속된 class로 한정한다.

@public

instance변수의 범위에 대한 제한을 없앤다.

 

다음은 exception handling을 지원하는 지시자이다.

Directive

정의

@try

Exceptions이 던져질 수 있는 block을 정의한다.

@throw

Exception object를 던진다.

@catch()

@try bolck안에서 던져진 exception을 catch한다.

@finally

@try block에서 Exceptions가 던져지던 아니던 수행되어질 block code를 정의한다.

 

다음은 declared properties feature를 지원하는 지시자이다.

Directive

정의

@property

Declared property의 선언을 시작한다.

@synthesize

Compiler에 custom implementations이 없는 accessor methods를 생성하도록 요청한다.

@dynamic

만약 이름이 따르는 properties와 관련있는 acessor methods의 implementation을 발견하지 못하면 compiler에게 warning을 생성하지 않도록 지시한다.

 

추가적으로 특별한 목적을 위한 지시자들이 있다.

Directive

정의

@class

다는 곳에서 정의된 class들의 이름을 선언한다.

@selector(method_name)

Method_name을 식별하는 compiled selector를 리턴한다.

@protocol(protocol_name)

protocol_name protocol을 리턴한다.(protocol class의 instance).

(@procotol은 forward declarations를 위해서는 (protocol_name)없이도 유효하다.

@encode

type_spec의 type structure를 encode한 char string을 가져온다.

@"string"

현재 모듈에서 Constant NSString object를 정의하고, 주어진 스트링으로 object를 초기화 한다.

MAX OS X v10.4와 이전, string은 7-bit ASCII-encoded 이어야 한다.

MAX OS v 10.5와 이후(Xcode 3.0과 이후), UTF-16 encoded string을 사용할 수 있다.

(MAC OS v10.2와 이후는 UTF-16encoded string을 지원한다. 그래서 MAC OS X v10.2와 이후에서 만약 app를compile하기 위해 MAC OS X v10.5를 사용하면, UTF-16 encoded string을 사용할 수 있다.)

@"string1" @"string2" ... @"stringN"

현재 모듈에서 constant NSString object를 정의한다.

생성된 string은 두지시자에서설명된 string을 연결한 결과이다.

@synchronized()

한번에 한 thread에 의해서만 실행되어져야 하는 code의 block을 정의한다.

 

4. Class

@interface 지시자로 선언된다.

#import "ItsSuperclass.h"
 @interface ClassName : ItsSuperclass < protocol_list > {
    instance variable declarations
}
method declarations
@end

 
자기 소유의 interface를 import할 때 선언하는 class.

#import "ClassName.h"
 
@implementation ClassName
method definitions
@end

 

5. Categories

Class와 동일하게 작성된다.

#import "ClassName.h"
@interface ClassName ( CategoryName ) < protocol list >
method declarations
@end

 

#import "CategoryName.h" 
@implementation ClassName ( CategoryName )
method definitions
@end

 

6. Formal Protocols(형식 프로토콜)

@protocol 지시자로 선언된다.

@protocol ProtocolName < protocol list >
declarations of required methods
@optional
declarations of optional methods
@required
declarations of required methods
@end

 

@optional 다음 method가 optional이란 걸 설명한다.

@required 다음 method가 protocol을 채택한 class에 의해 implement되어야 함을 설명한다. Default값

@protocol ProtocolName protocol에 대한 forward reference를 만든다.

@protocol ProtocolName;

 

소스내에서 protocol은 @protocol(protocol_name)와 비슷하게 사용되어 참조된다.

<protocol name list>는 다음 세가지 용도로 쓰인다.

- protocol 선언에서 다른 protocol들을 합치기 위해

- class나 category 선언에서, protocol을 채택하기 위해

- type 상술에서, type을 protocol을 따르게 하는 object에 한정하기 위해

Type Qualifier

정의

oneway

Method는 비동기적 메시지를 위한 것이고, 유효한 리턴타입를 가지지 않는다.

in

Argument는 remote receiver에 information을 pass한다.

out

Argument는 Reference에 의해 리턴된 정보를 get한다.

inout

Argument는 Information을 pass하고, get한다.

bycopy

Proxy가 아닌, Object의 copy로 pass나 return되어야 한다.

byref

현재 모듈에서 constant NSString object를 정의한다.

생성된 string은 두지시자에서설명된 string을 연결한 결과이다.

@synchronized()

Copy가 아닌 Object에 대한 reference로 pass나 return되어야 한다.

 

7. Method 선언

“+” class method 선언

“-” instance method 선언

Argument와 리턴 타입은 C문법에서의 type casting하는 방법으로 선언된다.

Argument는 “:”다음에 선언된다.

- (void)setWidth:(int)newWidth height:(int)newHeight

동일한 선언

- (void)setWidthAndHeight:(int)newWidth :(int)newHeight

 

8. Method Implementations

각각의 method implementation은 두개의 숨겨진 인자가 넘겨진다.

- receving object(self)

- method selector(_cmd)

유효한 다른 리턴을 갖지 않은 Method는 전형적으로 void를 리턴한다.

 

9. Deprecation Syntax

@interface SomeClass
-method __attribute__((deprecated));
@end

또는

#include <AvailabilityMacros.h>
@interface SomeClass
-method DEPRECATED_ATTRIBUTE;  // or some other deployment-target-specific macro
@end

Objective-C 2.0 이후 버전에서만 적용됩니다.

 

10. Naming Conventions(규칙,틀)

Class, category, and protocol 이름을 대문자로, Methods, instance variables은 소문자로 시작

“_”로 시작하는 method는 Apply에서 사용되어지도록 예약된 것임

같은 클래스의 Protocol, category는 protected name space를 가지고 있어,

Protocol은 class, category, 그 밖의 것과 같은 이름을 가질 수 있고,

한 class의 Category는 다른 class의 category와 같은 이름을 가질 수 있다.

Class name은 global variables나 defined type 처럼 같은 name space를 가지고 있어,

프로그램은 class와 같은 이름의 global variables를 가질 수 없다.

출처 : http://www.howapp.com

Posted by 닉네임영역
,


사랑합니다. 편안히 잠드소서