[Xcode] XCode VS AppCode

Mobile/iPhone / Xcode 2013. 11. 27. 12:54

링크 : http://codesheriff.blogspot.kr/2012/02/xcode-vs-appcode.html



'Mobile > iPhone / Xcode' 카테고리의 다른 글

[iOS] Open Source Chart for iOS  (0) 2013.01.12
[iOS] iOS Simulator 위치  (0) 2012.03.06
[iOS] About View Controllers  (0) 2012.03.06
[iOS] About Events in iOS  (0) 2012.03.04
[iOS] json parser for Objective-c  (0) 2012.03.04
posted by 뚱2
출처 : iOS document

View controllers are a vital link between an app’s data and its visual appearance. Whenever an iOS app displays a user interface, the displayed content is managed by a view controller or a group of view controllers coordinating with each other. Therefore, view controllers provide the skeletal framework on which you build your apps.

iOS provides many built-in view controller classes to support standard user interface pieces, such as navigation and tab bars. As part of developing an app, you also implement one or more custom controllers to display the content specific to your app. 

'Mobile > iPhone / Xcode' 카테고리의 다른 글

[iOS] Open Source Chart for iOS  (0) 2013.01.12
[iOS] iOS Simulator 위치  (0) 2012.03.06
[iOS] About Events in iOS  (0) 2012.03.04
[iOS] json parser for Objective-c  (0) 2012.03.04
[Xcode4] C, C++ 프로젝트 생성  (0) 2011.10.22
posted by 뚱2

출처 : 출처 : iOS document

Events are objects sent to an application to inform it of user actions. In iOS, events can take many forms: multitouch events, motion events—for example, from device accelerometers—and events for controlling multimedia. (This last type of event is known as a remote-control event because it originates from a headset or other external accessory.)



posted by 뚱2

iOS의 모든 클래스를 외우고 개발하시는 개발자는 없을것으로 생각됩니다. ^^
우선 찾고자 하는 클래스를 검색합니다.

Inherits from : 상속도를 나타냅니다. 여기서는 NSObject를 상속받았네요.
Conforms to : 상속외에 프로토콜도 같이 살펴봐야 하는데 여기 부분을 살펴보면 되겠습니다.
Framework :  어디에 있는 위치를 나타냅니다.
Declared in : 사용할때 포함해야 할 헤더 파일입니다.
Companion guides : 참고 문서 입니다.
Related sample code :  관련 샘플 소스 코드 입니다.


그리고 가장 중요한 Tasks (메소드) 들 입니다.
'+'는 클래스 메소드 이고 '-'는 인스턴스 메서드 입니다.
이중에 'Deprecated in iOS 2.0'은 이제 사용하지 말라는 메소드 입니다.

당연한거고 읽어보면 바로 알수 있는 것이지만 정리차원에서 올려봅니다. 
posted by 뚱2
인터페이스 빌더에서 컨트롤러를 연결하면 위치가 잘 나온다.
 


 
그런데 프로그램 코드상에서 연결하면 아래와 같이 나온다.
 

딱 Status Bar 크기 CGRect로 20포인트 만큼 위로 올라갔다.
코드에서 해당 View 를

myRootViewController 
    = [[MyRootViewController alloc] initWithNibName:@"MyRootViewController" 
                                             bundle:nil];
[self.window addSubview:myRootViewController.view];
[myRootViewController.view setFrame:CGRectMake(0, 20, 320, 460)];


20 포인트만큼 내려주자.  

ps. XCode 3.2와 XCode 4.XX 버전에서 View-base Application을 만들면 내부 구조가 다릅니다. 이부분을 정확하게 확인해 봐야 겠습니다.
     지금 문제는 단순하게 밀린 화면을 위로 올린것 뿐 입니다. 

#해결 (2011-08-08)
20 포인트로 고정하면 기기에 따른 status바가 다를수 있습니다. 일예로 아이패드와 호환성 문제가 발생할수 있습니다.
이때 UIScreen 으로 장치의 해상도와 실제뷰 화면의 해상도를 가져오면 유리 합니다.
    CGRect rect = [[UIScreen mainScreen] applicationFrame];
    [myRootViewController.view setFrame:rect];

 실제 디버깅 값입니다.
참고 : http://maccrazy.tistory.com/74 


추가 : 2012.03.04
iOS 5.0 이상부터는 아래와 같이 코딩하면 됩니다.
 
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    self.viewController = [[HelloWorldViewController alloc] initWithNibName:@"HelloWorldViewController" 
                                                                     bundle:nil];

    self.window.rootViewController = self.viewController;

    
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
posted by 뚱2
아이폰 개발하면서 XCode 상에서 직접디버깅을 할 수도 있지만 gdb를 이용해서 디버깅을 할수도 있습니다.
익숙해지면 정말 편합니다.

단축키 모음
* 브레이크 포인트 
b func
b 10
b file.c:func
b file.c:10
b +2
b -2
b *0x8049000
b 10 if var == 0

* 브레이크 포인트 지우기
cl func
cl 10
cl file.c:func
cl filec:10
d

* 진행 명령어
s
s 5
n
n 5
c
u
finish
return
return 123
si
ni

* 출력명령
p [변수명]
p [함수명]
p/[출력형식][변수명] 
p '[파일명]'::[변수명] 
p [함수명]::[변수명]
p [변수명]@[배열 크기] 
po

* 디스플레이 관련 명령
display [변수명]
display/[출력 형식][변수명]
undisplay [디스플레이 번호]
disable display [디스플레이 번호]
enable display [디스플레이 번호]

이정도만 알아도 디버깅 하는데 충분하다. 
설명은 차후 추가

참조 : 유닉스, 리눅스 프로그래밍 필수 유틸리티(백창우)
 
posted by 뚱2
Couldn't register XXX with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.


아무 이상도 없는데 디버그로 실행하다 보면 발생한다.
소스코드를 눈씼고 찾아봤고 다 뒤져봤는데 결국 못찾았다.
구굴링한 결과 리부팅이 직빵이라고 한다.

ps. 리부팅 하지 않아도 Xcode를 Command+Q로 종료하고 다시 실행하면 정상적으로 작동한다.

 
posted by 뚱2
간단 합니다. 주석처리할 영역을 선택하고 Command + / 해주시면 됩니다.
토글 버튼 입니다.

 
posted by 뚱2

Visual Studio 에서는 Visual Assist X라는 Add-In 프로그램이 있습니다.

이 프로그램을 사용하면 .h .cpp 파일간의 이동을 ALT+O로 편하게 이동할 수 있습니다.

xcode에서도 지원하는게 없나 찾아봤더니 있네요 ^^;

Xcode4.XX : command+control+↑ 

ps. 참고로 클래스나 델리게이트 문서를 보고 싶다면 해당 클래스에 커서를 놓고 option+더블클릭하시면 됩니다.
     , 디버깅 단축키는 command+option+Y 입니다.

 
posted by 뚱2