본문 바로가기

전체 글1040

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.
Mac OS X Lion 클린설치 (10.7)에서 Xcode 4 와 Xcode 3 동시에 사용하기. 간단하면서 쉬운 방법은 1. Mount the Xcode 3.2.6 DMG 2. Open Terminal 3. Enter the command: export COMMAND_LINE_INSTALL=1 4. Enter the command: open “/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg” 이렇게 하는거구요. 위에 간단한 설치법이 안된다면 밑에 글을 참고하세요. 강좌를 작성하긴 했지만, 시스템에 따라 Xcode 3과 4 모두 사용할시 충돌이나 알수없는 오류도 보이더군요. 개인적으로 강좌를 이용해서 Xcode3 하나만 깔아서 쓰시는걸 권장합니다. 클린설치가 아닌 경우에도 똑같이 적용이 가능합니다. 즉, 스노우레오파드에서 라이언으로 업그레이드후 Xcode 3만.. 2012. 2. 18.
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.
폼의 편의성이나 디자인을 강화하는 jQuery 플러그인 문의사항이나 유저등록, 로그인부터 상품의 주문까지, 웹에서 상당히 중요한 폼 요소. 이 폼의 편의성이나 디자인은 그 사이트의 매상이나 등록에 크게 영향을 준다고 해도 과언은 아닙니다. 폼의 입력항목이 너무 많거나 어려울경우, 모처럼 구입이나 유저등록을 할 맘이 생긴 유저들도 외면해버리겠죠.^^; 이번 회에서는 폼의 디자인이나 편의성을 강화해주는 jQuery의 플러그인을 여러가지로 정리해보았습니다. Perfect signin dropdown box likes Twitter with jQuery Twitter의 사인 인 박스같은 드롭다운박스를 재현해줍니다. Lightbox_me – Stupidly Simple Lightboxing 라이트박스로 로그인표시가 가능합니다. Pretty checkboxes with.. 2012. 2. 10.
셀렉트리스트박스 jquery 이용 셀렉트 리스트 박스에서 jquery를 이용한 추가와 삭제 위아래 이동 1-1 1-2 1-3 2-1 2-2 2-3 3-1 3-2 3-3 4-1 4-2 4-3 리스트 박스의 값을 asp로 구분자(@) 끼어 넣고 넘기기 select3v2.asp select3v2.htm 수정 하기 포함 select3v3.asp select3v3.htm 참조사이트 : http://www.electrictoolbox.com/jquery-add-option-select-jquery/ 2012. 2. 10.
jquery selectbox option 순서 이동 jquery의 before()와 after()를 이용해서 multiple selectbox에서 순서이동을 한다. function selectUp(){ $('#orderSelect option:selected').each(function(){ var selectObj = $(this) if(selectObj.index() == 0 ) return false; var targetObj = $('#orderSelect option:eq('+(selectObj.index()-1)+')'); targetObj.before(selectObj); }); } function selectDown(){ $('#orderSelect option:selected').each(function(){ var selectObj = .. 2012. 2. 10.
Easy Widgets를 이용한 정렬 순서 수정 어제 jQuery Plugin Easy Widgets 포스트에서 구상했던 페이지를 간단하게 구현해봤다. 작업은 생각한 것보다 어렵지 않았고 jQuery를 이용했기 때문에 쉽게 구현이 될 수 있었던 것 같다. 이 기능은 쇼핑몰에서 상품 리스트 정렬 순서를 변경할 때 사용하려고 한다. 상품 리스트에서 상품 순서를 변경 후 완료 버튼을 누르면 모든 상품에 대해서 정렬 순서를 변경하는 것이 핵심이다. 단 상품이 아주 많다면.. 생각을.. ㅋ 이런 식으로 위젯을 마우스로 드래그하면 위치를 바꿀 수 있는데 각 위젯은 고유한 index를 가지게 된다. 이 index를 정렬 순서로 변경하는 것이 핵심이라면 핵심이다. 아래는 실제 테스트한 소스 코드들이다. 쇼핑몰이 영카트4 기반으로 제작되기 때문에 기본 코드들은 그냥 .. 2012. 2. 9.
셀렉트 박스 사이의 항목이동 및 순서변경 좌측 항목 A B C D 맨위 위 아래 맨아래 삭제 우측 항목 A B C D 맨위 위 아래 맨아래 삭제 좌측으로 우측으로 2012. 2. 9.
순서변경 스크립트 첫번째 두번째 세번째 네번째 다섯번째 2012. 2. 9.
select option Add/Remove 상황 : 오른쪽 셀렉트 박스는 데이터베이스에서 부서 정보를 가져온다. '' 버튼 : rmvDept 내가 생각한 허접한 코드 var dataValue = null; var dataText = null; var inValue = null; var inText = null; $("#Category_Data").click(function() { dataValue = $("#Category_Data > option:selected").val(); dataText = $("#Category_Data > option[value=" + dataValue + "]").text(); }); $("#IN_CategoryIds").click(function() { inValue = $("#IN_CategoryIds > opt.. 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.
탭바(UITabBarController) 3장 - 탭바 아이템 1. 탭바에 들어갈 이미지와 각탭의 이름을 설정해줍니다. 이미지 형식은 알파값으로만 구성되어있는 .png를 사용하시면 됩니다. 이미지의 사이즈는 탭의 갯수가 유동적일수 있으나 최대 5개까지만 보여지고 6개이상이되면 ...으로 묶여버립니다. 물론 6개이상의 탭을 구성한다고 하더라도 각탭의 모든 아이콘은 확인할수 있습니다. 하지만 디자인적으로 화면에 보여지는 최대숫자인 5개에 맞춰서 유연하게 사용할수 있도록 50 X 30 사이즈로 만들어 줍니다. (여기서 사용된 이미지를 첨부해뒀습니다) 어플리케이션 폴더로 찾아들어가셔서 폴더를 하나 추가한뒤에 폴더명을 바꾸시고(Images로 바꿨습니다), 이미지파일들을 넣어주세요. 그후에 이름을 변경하신 폴더를 (저는 "Images"폴더가 되겠지요) Xcode왼쪽에 있는 G.. 2012. 2. 9.