Jun 30
alonesiphone apple, dev, iphone, iphone_dev, latitude, longitude, map, math
인터넷에 있는 기존 코드를 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
Jun 30
alonesiphone apple, ib, interface builder, iphone, iphone_dev, 아이폰
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
Jun 29
alonesiphone iPad, iphone, mirroring, opensouce, Screen
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