[iPhone Dev] 지도 상 두 점의 위도 경도를 입력 받아 두 점 사이의 거리와 각 구하는 함수

1 Comment

인터넷에 있는 기존 코드를 iPhone으로 변경해서 만들어 봤는데.. 구글 맵 등으로 테스트 해보니 잘 동작합니다.

-(double)distanceLat1:(double)aLat1 long1:(double)aLong1 lat2:(double)aLat2 long2:(double)aLong2 {
double R = 6371;
double dLat = (aLat2 – aLat1)*M_PI/180.0;
double dLon = (aLong2 – aLong1)*M_PI/180.0;

double a = sin(dLat/2) * sin(dLat/2) + cos(aLat1*M_PI/180.0) * cos(aLat2*M_PI/180.0) * sin(dLon/2) * sin(dLon/2);
double c = 2 * atan2(sqrt(a), sqrt(1-a));
return R * c;
}

-(double)angleLat1:(double)aLat1 long1:(double)aLong1 lat2:(double)aLat2 long2:(double)aLong2 {
return atan2( aLat2-aLat1 , aLong2 – aLong1)* 180.0 / M_PI;
}

Ref: http://www.movable-type.co.uk/scripts/latlong.html

Ref: http://cafe.naver.com/hhjae84.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=122

[iPhone Dev] 추가한 class를 Interface Builder가 인식하게 만들기

1 Comment

IB를 정말 어쩔 수 없는 경우에만 사용하긴 하지만 아무튼 아래와 같이 것도

Unknown class in Interface Builder file.

To fix the issue, you need to set the -ObjC linker flag. In Xcode go to Project -> Edit Project Settings, find the “Other Linker Flags” entry and add the following (capitalization important) “-ObjC” without the quotes. This should do it.

Ref: http://support.mobclix.com/forums/65895/entries/95353

[iPhone Dev] Quartz로 화면에 손가락으로 그림 그리기

1 Comment

Ref: http://www.ipodtouchfans.com/forums/showthread.php?t=132024

[iPhone Dev] OpenGL ES for iPhone: Drawing a Circle – Part I

2 Comments

아주 자세하진 않지만 설명도 잘 되어있고,

필요한 것들을 잘 사용해서 Drawing을 한 Tutorial (?)

Screenshot of the finished OpenGL ES application. A red  circle is showing in the iPhone Simulator.

Ref: http://vormplus.be/weging/opengl-es-for-iphone-drawing-a-circle-part-i/

[iPhone Dev] iPhone이나 iPad의 화면 (Screen)을 vga adaptor를 이용해서 다른 screen으로 mirroring해주는 open source

1 Comment

iphoneos-screen-mirroring

Provides a simple UIApplication category to enable screen mirroring starting in iPhone OS 3.2 and iOS 4 (only on the iPhone 4). It uses to new UIScreen APIs to discover external screens.

This project is sponspored by Backelite

http://code.google.com/p/iphoneos-screen-mirroring/

How to sue

아래만 하면 된다고 합니다.

[[UIApplication sharedApplication] setupScreenMirroringOfMainWindow:mainWindow framesPerSecond:20];

아직 테스트는 안 해봤는데.. 곧 해서 결과도 올려드리겠습니다.

Ref: http://stackoverflow.com/questions/2662201/ipad-vga-connector-mirror-screen-in-own-application

Older Entries