본문 바로가기

프로그래밍439

2012 안드로이드 개발 프로그램 설치방법 - 4 안드로이드 SDK 설치 출처 : http://blog.naver.com/theparanbi/80153324190 4. 안드로이드 SDK 설치 ( 화면 3.17 ) 앞 단계에 나온 화면 3.17에서 Target Location을 화면 3.18과 같이 C:\android\android-sdks로 바꿉니다. 다른 위치를 지정해도 되나 전에 만든 C:\android\workspace에 묶어 주기 위해서 같은 위치의 폴더로 잡은 것입니다. 만일 전에 안드로이드 SDK를 설치 해놨다면 “Use existing SDKs"에 폴더 위치를 지정해주고 “Next”를 눌러 주면 됩니다. 일단 이 글을 보시는 분들은 대부분 처음일 테니 그냥 위와 같이 폴더를 정해주세요. 참고로 안드로이드 최신 버전이 아닌 이전 버전( Android 2.1)을 설치.. 2012. 4. 5.
2012 안드로이드 개발 프로그램 설치방법 - 3 ADT 설치 출처 : http://blog.naver.com/theparanbi?Redirect=Log&logNo=801533125063. 안드로이드 개발 도구 (ADT) 설치 안드로이드 개발 도구 즉 ADT는 이클립스 안에서 작동 되는 것입니다. 모든 설치 과정이 이클립스 안에서 이뤄집니다. 설치를 위해 앞 단계에서 설치한 이클립스를 켜주세요. 이클립스를 실행시키면 화면 3.1 과 같이 나옵니다. ( 화면 3.1 : 이클립스 초기화면 ) 이어 화면 3.2가 같이 뜹니다. 작업 폴더를 설정하라는 것입니다. 앞으로 안드로이드 프로그래밍 작업을 할 폴더를 빨간 상자 안에 지정해주면 됩니다. 저는 c:\android\workspace로 적었습니다. 미리 폴더를 만들어 놓지 않아도 이곳에 적은 그대로 폴더가 생깁니다. 기존.. 2012. 4. 5.
2012 안드로이드 개발 프로그램 설치방법 - 2 이클립스 설치 출처 :http://blog.naver.com/theparanbi?Redirect=Log&logNo=80153312506 2. 이클립스 설치 두 번째 단계로 자바 개발 IDE 도구 이클립스를 설치하겠습니다. 우선 http://www.eclipse.org/ 로 들어가세요. 메인 화면이 보이면 위에 있는 Downloads 또는 오른쪽에 Download Eclipse 중 아무거나 둘 중 하나 누르세요. ( 화면 2.1 : 이클립스 사이트 화면 ) 화면 2.2 가 뜨면 목록에 나오는 여러 개 중에 안드로이드 개발에 필요한 Eclipse IDE for Java Developers 를 고릅니다. 기본적으로 Windows가 화면에 나오는데 혹 다른 운영체제를 쓰신다면, 오른쪽 위에 있는 Windows라 써 있는 곳을.. 2012. 4. 5.
2012 안드로이드 개발 프로그램 설치방법 - 1 Java SDK 설치 출처 : http://blog.naver.com/theparanbi?Redirect=Log&logNo=80153312506 많 은 분들이 전에 올렸던 안드로이드 개발환경 프로그램 설치 방법을 봐주셨습니다. 그런데 요즘 설치 과정에서 변화가 생겨 전에 올린 포스팅 설정 방법과는 맞지 않는 것이 있더군요. 그래서 그런지 질문하시는 분도 많고 설치를 제대로 못하시는 분도 계신 것 같습니다. 그래서 다시 시간을 내, 테스트해서 이글을 올리게 되었습니다. 이 번 포스팅은 지난번과 구성은 같으나 내용에 그동안 질문을 받았던 부분과 자주 틀리셨던 부분도 같이 보강하고 새로운 방법에 맞게 수정을 했습니다. 그러므로 안드로이드 개발에 입문하시는 분이나 새롭게 설치하는 분은 이전 글보다는 지금 올리는 2012년 글을 참고.. 2012. 4. 5.
Xcode4에서 범용으로 쓸 수 있는 library만들기. 개발하다보면 Common Module 혹은 Common Library 등.. 이런 뉘앙스의 이름으로 불리는 녀석들이 있다. 개발하는데 공통적으로 쓰이는 것들을 모아놓은 녀석들을 지칭하는 말인데, cocoa에서는 이렇게 안부르고 static library라고 부른다. iPhone, iPad의 경우 시뮬레이터가 있다보니 시뮬레이터(simulator)용, 디바이스(device)용 이렇개 2가지를 만들어서 상황에 맞게 사용을 해야 하는데, 이게 참 번거로운 일이다. 생각해보라. 시뮬레이터로 테스트 할땐 시뮬레이터용 라이브러리를 넣고 디바이스에서 테스트 할땐 시뮬레이터용 라이브러리를 삭제하고, 디바이스용 라이브러리를 넣고 다시 시뮬레이터로 테스트 할땐 디바이스용 라이브러리를 지우고, 시뮬레이터용 라이브러리 넣고... 2012. 3. 29.
SVN X remains in tree-conflict 간혹 Eclipse에서 새로운 리소스 폴더를 추가하거나 패키지를 추가하고 Commit 또는 Update를 수행하면 아래와 같은 메시지가 뜨며 실패하는 상황이 발생한다. "SVN X remains in tree-conflict" 이럴때는 아래와 같이 수행하면 해결된다. 1. 충돌이 발생한 디렉토리를 프로젝트 외부로 이동 2. 이동된 디렉토리에서 숨겨져 있는 .svn 폴더를 삭제 3. 이후 해당 프로젝트에서 svn cleanup 메뉴 수행 4. 다시 해당 프로젝트에서 svn update 메뉴 수행 5. 외부로 이동시킨 디렉토리를 다시 프로젝트로 복귀 6. 이후 해당 프로젝트에서 svn commit 메뉴 수행 2012. 3. 22.
iPhone용 Open Source 모음 http://www.cocoacontrols.com/platforms/ios/controls/mnmbottompulltorefresh https://github.com/enormego/EGOTableViewPullRefresh http://michael.stapelberg.de/cCSVParse http://www.cocoacontrols.com/platforms/ios/controls/balabel http://www.cocoacontrols.com/platforms/ios/controls/fxlabel http://www.cocoacontrols.com/platforms/ios/controls/coolbuttons http://www.coco.. 2012. 3. 22.
iOS Flip Transform 출처 : http://www.binpress.com/app/ios-flip-transform/687 Animation component for the effect of flipping as in a news/clock ticker, or a page turn. Structured around the idea of a data object (i.e. headline in news, number in a clock, page in a book) as an animation frame, comprised of multiple CALayers. Supports 3 interaction modes: Triggered: as in a tap to flip Auto: as in a revolving flip that.. 2012. 3. 6.
Creating an iPad flip-clock with Core Animation 출처: http://www.voyce.com/index.php/2010/04/10/creating-an-ipad-flip-clock-with-core-animation/ As part of the sliding puzzle game I’m developing for the iPhone and iPad (well, I can’t survive on the profits from BattleFingers forever), I looked for a way to represent a numeric score and time display in an interesting way. One of the nicer visual effects you could use for this is the “flip-card c.. 2012. 3. 6.
iPhone 에서 OAuth 라이브러리 사용하기 지난 주에 아이폰에 OAuth 컨슈머 라이브러리 돌리는데 삽질을 너무 많이 해서 반성하는 의미로 포스팅 해본다.http://oauth.net에 있는 라이브러리는 아이폰에 바로 쓸 수 없어서 약간 손을 봐야하는데 누군가 이미 해놓은 것도 있지만 기본(?) 라이브러리로 한번 해봤다. 붙이는건 그렇게 어렵지 않은데 아이폰에 써드파티 바이너리 프레임웍 추가 안되는거랑 Security.framework 내용이 Mac의 것과 다르다는 걸 몰라서 시간을 엄청 허비했음. OAuthTest.zip OAuthConsumer 라이브러리를 체크아웃 한다. svn checkout http://oauth.googlecode.com/svn/code/obj-c/ . 프레임웍으로 빌드해서 넣으면 깔끔하겠지만 아이폰에는 그렇게 넣을 수.. 2012. 2. 29.
OAuthConsumer를 이용한 xAuth 출처: http://dreamofblue.tistory.com/tag/OAConsumer OAuthConsumer 는 Objective-C로 구현된 OAuth 라이브러리이다. 이 라이브러리는 OAuth에 필요한 여러 모듈들을 포함하고 있으며 이를 이용하여 xAuth 인증도 가능하다. 인증 방법은 아래와 같다. 1. OAConsumer 에 부여받은 Consumer Key와 Secret를 입력한다. Twitter에서 Consumer Key와 Secret을 받기 위해서는 "http://dev.twitter.com/apps/new"에 접속하여 등록하고, Foursquare에서 받기 위해서는 "http://foursquare.com/oauth/"에 접속해서 등록한다. OAConsumer *consumer = [O.. 2012. 2. 29.
localize 출처 : http://stackoverflow.com/questions/1669645/how-to-force-nslocalizedstring-to-use-a-specific-language I have found another solution that allows you to update the language strings, w/o restarting the app and compatible with genstrings: Put this macro in the Prefix.pch: #define currentLanguageBundle [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:[[NSLocale preferredLanguages] .. 2012. 2. 17.
Advance Localization in ios apps Localization in ios is usually done using this way. But the main problem with this approach is that to view the application in other language the language has to be changes from the settings of the ios device. In this post i will present an approach in which you can set the language of the application from within the application. but before starting lets understand the current localization proce.. 2012. 2. 17.
로컬라이징 현재 iPhone을 개발하시는 분들은 대부분 해외 시장을 염두에 두고 개발을 하고 계시리라 생각합니다. 결국, 한국어와 영어를 동시에 지원해야하는 과제가 생기겠죠. iPhone의 로컬라이징에 대한 정보가 많이 없어서 간략하게 정리해볼까 합니다. 1. xib 로컬라이징 xib는 아시다시피 Interface Builder로 만든 UI 인스턴스 입니다. xcode에서 로컬라이징할 xib를 선택한후 Get Info를 합니다. General Tab에서 Make Localization을 클릭하면 기본적으로 English가 만들어집니다. Korean을 추가하려면 Add Localization을 클릭하여 Korean을 입력하면 생성이 됩니다. 이 순간부터 독립적인 UI가 생기므로 개발이 완료된 후 이 작업을 하시는 것.. 2012. 2. 17.
문자열 지역화 @implementation Language static NSBundle *bundle = nil; +(void)initialize { NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString *current = [[languages objectAtIndex:0] retain]; [self setLanguage:current]; } /* example calls: [Language setLanguage:@"it"]; [Language setLanguage:@"de"]; */ +(void)setLanguage:(NSString *).. 2012. 2. 17.
Localizing iPhone Apps – Internationalization By localizing an iPhone app, we display cultural information in the user’s specified locale, but what about the text, like the application name and displaying visible information in user’s preferred language. In this tutorial, I will show you how we can use resource files to display visible text in user’s language. Localizing iPhone Apps – Part 1 Localizing iPhone Apps – Custom Formatter Localiz.. 2012. 2. 17.
NSDate / NSDateFormatter date //NSDateFormatter 를 생성한다. NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init]; //데이트 형식을 지정한다. [inputFormatter setDateFormat:@"yyyy-MM-dd 'at' HH:mm"]; //inputFormatter 에 지정한 형식대로 NSDate 가 생성된다. NSDate *formatterDate = [inputFormatter dateFromString:@"1999-07-11 at 10:30"]; //위에 까지가 날짜 생성 //NSDateFormatter 를 생성한다. NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; //.. 2012. 2. 15.
셀렉트 박스 사이의 항목이동 및 순서변경 좌측 항목 A B C D 맨위 위 아래 맨아래 삭제 우측 항목 A B C D 맨위 위 아래 맨아래 삭제 좌측으로 우측으로 2012. 2. 9.
순서변경 스크립트 첫번째 두번째 세번째 네번째 다섯번째 2012. 2. 9.
맵뷰(MapView) 5장 - 한점과 나의 거리는?? (getDistanceFrom:) 결과물입니다. ===================================================================================== .h에서 거리를 위한 변수하나를 잡아줍니다. @interface testLocationViewController : UIViewController { CLLocationManager *locationManager; CLLocation *startPoint; MKMapView *myMapView; NSMutableArray *arrayLatitude; NSMutableArray *arrayLongitude; NSMutableArray *distance; } @property (nonatomic, retain) CLLocationManager.. 2012. 2. 9.
맵뷰(MapView) 4장 - 원하는 위치를 표시(Pin Annotation)하자!! MapKit에서 핀을 꼽는데 필요한 정보는 latitude/longitude가 필요하고, 핀을 터치했을때 팝업될 메시지로 Title/SubTilte을 필요로 합니다. Pin을 꼽기 원하는 위치의 좌표를 NSArray로 잡아줍니다. 여기서는 랜덤으로 좌표를 구해서 10개정도 찍어보려합니다. 우선 좌표를 구해야 겠죠? 제가 핀을 꼽으려는 위치는 경기도 일산에 위치한 호수공원 주위입니다. 네이버 지도나 구글맵을 이용하시면 됩니다. 방법은 비슷합니다. 저는 네이버 지도를 이용했습니다. 으헝... 정사각형을 그리려고 했는데 망했네요 ;ㅅ; 저 빨간 네모 안에 좌표를 구해줄꺼에요. 모서리를 중심으로 잡습니다. 구글맵에는 '지도 중앙으로 설정' 옵션이 있는데 네이버꺼는 없네요. 야메로 해줍시다. 모서리를 우클릭해서 .. 2012. 2. 9.
맵뷰(MapView) 3장 - CLLocation을 이용해 MapView에 현재위치 표시하기 2장에 이어 .m 마저 해봅시다. - (id) init { self = [super init]; if (self != nil) { myMapView = [[MKMapView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 480.0)]; [myMapView setShowsUserLocation:YES]; [myMapView setMapType:MKMapTypeStandard]; [self.view insertSubview:myMapView atIndex:0]; } return self; } - (id) init {} 초기화 함수입니다. 이안에 코딩할예정입니다. init나 ViewDidLoad, viewDidAppear중 어디에 코딩을 할지는 어플리케이션의 용도에 따.. 2012. 2. 9.
맵뷰(MapView) 2장 - Frameworks추가 이제 프레임워크를 추가합니다. 추가할 프레임 워크는 CoreLocation과 MapKit 입니다. 코어로케이션은 현재의 위치를 계속 추적하고, 맵킷은 지도를 화면에 띄우는 역활을 합니다. 추가한후에 ViewController.h으로 갑니다. #import #import #import @interface testLocationViewController : UIViewController { CLLocationManager *locationManager; CLLocation *startPoint; MKMapView *myMapView; } @property (nonatomic, retain) CLLocationManager *locationManager; @property (nonatomic, retain) .. 2012. 2. 9.
맵뷰(MapView) 1장 - ViewController 추가 MapView를 이용해 할수있는걸 다 해보려고 하는데 어디까지 갈지 모르겠네요. 새 프로젝트를 Window Based Application으로 합니다. 관례상 인스턴스 변수와 메서드의 이름은 소문자로 시작합니다. 만약 여러 단어로 되어 있다면 새로운 각 단어의 첫 글자는 대문자로 표기해야 합니다. (예: newFriendName) 또한 클래스 이름은 대문자로 시작합니다!! 쭉 진행하다 보니까 소문자로 만들었더라고요. 관례라는건 보편적으로 사용되는 것이니까 저처럼 실수하지 마시고 따라주세요(TestLocation) 늅늅!! 이렇게 만들면 아무런 템플릿도 적용안된 순수코드가 됩니다. (프로젝트명을 testLocation만들었습니다.) 어플이 시작되면 main함수에서 testLocationAppDelegate.. 2012. 2. 9.