블로그 이미지
fiadot_old

칼퇴근을 위한 게임 서버 개발 방법론에 대한 심도있는 고찰 및 성찰을 위한 블로그!

Rss feed Tistory
Technical Article/Mac & iPhone 2012. 1. 31. 20:44

[Xcode4.2] 스토리 보드 기반 탭바 프로젝트에 + cocos2d + Box2D 연동


- 2개 프로젝트 생성
cocos2d 프로젝트(이하 A)생성
스토리 보드 이용하는 프로젝트(이하 B)  생성 (ARC 옵션 사용 안함)

- A의 libs와 resources를 B에 복사 후 프로젝트에 추가
GameConfig.h, GLES_Render.*, HelloWorldLayer.* 도 모두 복사 후 프로젝트 추가 

 

* 만약 ARC 옵션을 사용했다면 다음과 같이 NO로 변경 




- 프로젝트 설정 변경







- 라이브러리 추가 



- 프로젝트에서 빌드 되나 확인 ^^;

- UIViewContoller 추가
m 확장자를 mm으로 바꿔줘야 에러 발생 안함 


- 뷰에 붙이기

#import "HelloWorldLayer.h"
.
.
.

- (void)viewDidLoad

{

    [super viewDidLoad];


    if(![CCDirector setDirectorType:kCCDirectorTypeDisplayLink]) {

[CCDirector setDirectorType:kCCDirectorTypeDefault];

}

    

CCDirector *director = [CCDirector sharedDirector];

    

    CGRect screenRect = [[UIScreen mainScreen] bounds];


  EAGLView *glView = [EAGLView viewWithFrame:screenRect

  pixelFormat:kEAGLColorFormatRGB565

  depthFormat:0

];

[director setOpenGLView:glView];

[director setAnimationInterval:1.0/60];

[director setDisplayFPS:YES];

[self setView:glView];

[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];

[[CCDirector sharedDirector] runWithScene: [HelloWorldLayer scene]];

}



- (void)viewDidUnload

{

   [[CCDirector sharedDirector] end];

    [super viewDidUnload]; 
}

  

 

 
- 빌드 후 확인 
,
Technical Article/Mac & iPhone 2012. 1. 26. 20:44

[OSX] 단축키


캡쳐(파일 저장)
전체화면 : Cmd+Shift+[3]
화면일부 : Cmd+Shift+[4]
윈도우 : Cmd+Shift+[4] , 해당 윈도우 커서 이동 [Space]
- 클립보드로 저장하고자 하면 Ctrl 추가

프로세스
강제종료 : Cmd + Opt + ESC
전환 : Cmd + TAB

Safari
Refresh : Cmd + R

Xcode 4.2
소스 헤더 전환 : Ctlr + Cmd + [UP]
실행(디버깅) : Cmd + R
빌드 : Cmd + B
실행된거 정지 : Cmd + .(점)

디버깅 창 : Ctrl + Cmd + R
콘솔 창 지우기 : Ctrl + K

 
,
TOTAL TODAY