본문 바로가기

전체 글1040

Web에서 App실행하는 Javascript iOS용 run MyApp 안드로이드 용 2012. 6. 15.
MS-SQL 랜덤 Select select * from 테이블명 order by newid() newid() 를 이용해서 랜덤으로 select를 할 수 있다. newid 자세히 알아보기 2012. 6. 15.
보네이도 청소방법 2012. 6. 10.
아이폰 앱 76개 소스코드, 강좌, 개발 팁 링크모음 출처 : http://xguru.net/622 아이폰 개발시 도움이 되는 각종 팁 , 튜토리얼, 소스코드 링크 모음입니다. 제가 주로 트위터를 통해서 공개한 것들입니다만, 워낙 간헐적으로 트위팅 한듯해서 좀더 링크를 모아서 포스팅 합니다. 한글판 앱스토어 리뷰 가이드라인은 아이폰 앱 개발자분들은 꼭 한번 읽어보셔야 합니다. Open Source iPhone Apps List – 43 App Store Apps So Far ! 아이폰 앱들중에 앱스토어에 등록되어 있으면서도, 소스가 공개되어 있는 앱들의 모음입니다. 관련 앱을 개발할 때 참고하면 아주 유용하게 사용할수 있을것입니다. 트위터 클라이언트 Natsulion, Tweetee,Tweetero,Twitterfon ( 많은분들이 사용하시는 EchoFon.. 2012. 6. 6.
FaceBook Graph Api 설명 출처 : http://developers.facebook.com/docs/reference/api/ At Facebook's core is the social graph; people and the connections they have to everything they care about. The Graph API presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared .. 2012. 6. 2.
Swipe Gesture with UIWebView webView에서 마우스액션처럼 뒤로 앞으로 구현!! - (void)viewDidLoad { [super viewDidLoad]; //Swipe Left UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction:)]; swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft; //swipeLeft.delegate = self; [webView addGestureRecognizer:swipeLeft]; //Swipe Right UISwipeGestureRecognizer *swipeRight .. 2012. 5. 31.
.a 라이브러리 파일 SVN commit 방법 svn이 기본적으로 .a 파일에 대해 ignore되어 있다고 합니다. 이를 commit하기 위해서는 다양한 방법이 있습니다. 먼저, 직접 커맨드를 이용하여 하는 방법입니다. ; svn add 파일명 --no-ignore 그리고 svn설정에 .a가 ignore된 설정을 지우는 방법입니다. ; cd ~/.subversion; config파일을 열어서 global-ignores에서 *.a 제거해주시면 됩니다. 2012. 5. 24.
Xcode 에서 라이브러리 파일(*.a)가 ignore 처리되어 SVN에 등록되지 않을때 해결방법 Xcode 에서 라이브러리 파일(*.a)가 ignore 처리되어 SVN에 등록되지 않습니다. Xcode상에서도 해당 라이브러리 파일은 I로 표시되고, unignore 버튼을 눌러도 처리되지 않습니다. 할 수 없이 터미널 상에서 다음과 같은 명령을 사용해 강제 처리해야합니다.lib.a를 추가해야 한다면 다음과 같이 터미널에서 실행하세요.$ cd /lib.a가 있는 폴더$ svn add lib.a A (bin) lib.a$ svn st A lib.a$ svn commit -m 'lib.a 를 추가함'한번만 처리해 두시면 *.a 파일과 씨름하지 않아도 됩니다. ^^ 2012. 5. 24.
메모리 관리 규칙 규칙1] - alloc, copy, new 를 포함하는 메서드는 retain된 객체를 리턴한다.   이 리턴되는 객처는 retain되어 있기 때문에 반드시 release를 호출해야 한다.규칙2] - 자신이 retain 호출했다면 반드시 release를호출해야 한다.규칙3] - 클래스메서드가 객체를 생성해 줄 때는  autorelease 객체를 리턴한다.   그렇기 때문에 별도의 release를 호출하지 않아도 오토릴리즈 풀이 자동으로 release를 호출한다.  하지만, 이 객체에 대한 retain을 호출했다면 같은 횟수만큼 release를 호출해야 한다.  예)  NSString *pStr = [NSString stringWithString:@"Test"];규칙4] - 배열, 딕셔너리 등의 자료구조 클.. 2012. 5. 19.
MPMoviePlayerController의 상태에 따른 처리팁 - (void)viewDidLoad { // 노티센터에 상태값 등록 // 동영상 상태값 변경 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateDidChange:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:self.movieController]; // 동영상 종료 원인 파악 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotifica.. 2012. 5. 15.
푸쉬 알림 관련 자료 시간도 좀 늦었고; 일이 좀 있는 관계로 설명은 지금 못 올리겠구요; 필요하신 분들이 좀 계신거 같아서 관련 소스 올려 두겠습니다. 알림 설정에서 설정된 앱의 알림 on off 값을 참조 할 수 있는 자료 입니다. 5.0으로 넘어오면서 조금 바뀌긴 했지만 참고하는데 큰 지장은 없을 것 같네요~ 소스는 cookbook에서 제공하는 소스이고, 오픈되어 있는거 같기는 한데(주소만 알면 누구나 받을 수 있음) 혹시나 문제가 된다면 삭제토록 하겠습니다. 그럼 즐코딩들 하세요~ 급한 분들을 위한 한가지 덧. enabledRemoteNotificationTypes 요 값을 이용하시면 처리가 가능 하실겁니다~ ㅋ 출처: http://cafe.naver.com/mcbugi/169592 2012. 5. 9.
IAP 관련 정리 자료 IAP를 급작스럽게 구현하게 되어 -_-; 구글링 중 바로 나오는 반가운 한글 문서 링크입니다.파일로도 받을 수 있는데 막 받아도 되는지 잘 모르겠어서 링크로 올립니다. http://wangsy.com/blog/wp-content/uploads/2011/11/IAP-Guide1.pdf 제가 보기엔 정리가 매우 잘 되어 있는거 같은데..날짜도 비교적 최신이고...4.2 버전을 기준으로 써 주셨네요도움들 되셨으면 합니다. 까페에 마그리스님이 올려두신 자료도 있는데 같이 참고하시면 좋을 것 같습니다. ㅋ 출처 : http://cafe.naver.com/mcbugi/212089 [참고]하하2012/05/08 12:02답글신고애플에있는 공식가이드가 더 자세한 절차로 알려주는거같네여 첨iap구현하신다고 하여 팁을 .. 2012. 5. 9.
uiwebview 사용 시 확대 축소 uiwebview에서 html 페이지를 열 경우 확대 축소 기능을 설정하려고 할 때, 웹뷰를 선언한 다음 해당 웹뷰의 속성값 중 scalesPageToFit 를 YES 로 설정함. 2012. 5. 9.
MPMoviePlayerViewController 컨텐츠 이어서 재생하기 이것 떄문에 3일을 삽질 한걸 생각 하면 아직도 비통하다.. Info.plist -> Required background modes 항목을 추가 시켜준다. 이 항목에 app play audio를 추가해준다. 출처 : http://infact987.blog.me/150444079 2012. 5. 8.
iPhone 동영상 재생 - MPMoviePlayerViewController iOS 3.1.3 까지는 동영상 재생을 원할때 MPMoviePlayerController를 사용했었습니다. iOS 3.2 이상 버전에서는 MPMoviePlayerViewController가 추가되었습니다. 아래와 같이 사용하면 3.1.3 이전 버전과 3.2 이상 버전에서 모두 동작하도록 할 수 있습니다. 제 경우에는 UIViewController에 아래 코드를 추가하고 동영상 재생을 원하는 곳에서 노티피케이션으로 알려서 재생을 하는 방식으로 처리했습니다. - (void) moviePlayBack:(NSNotification *)noti { NSURL *movieURL = (NSURL *)[[noti userInfo] objectForKey:@"url"]; if ([[[UIDevice currentDevi.. 2012. 5. 8.
맥어드레스 가져오기 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273#include #include #include #include ... - (NSString *)getMacAddress{ int mgmtInfoBase[6]; char *msgBuffer = NULL; size_t length; unsigned char macAddress[6]; struct if_msghdr *interfaceMsgStruct; struct.. 2012. 5. 2.
Custom AlertView 잠시 일이 생겨서, 일좀 하고 왔습니다. ㅇㅅㅇ.. 요 아래 비슷한거 만들고 왔어요. 그래서, 바로 요아래와 같은걸 만들어보도록합시다..!! 꺄야야야... 근데과연 몇강까지 갈지 궁금한 "기타 잡다한것 강의..."몇강까지 갈까가, 아니라 이름 바꾸어서 끊어버렸습니다 ㅇㅅㅇ...!!! 에잇, 중간에 일하느라 뭘 쓰고 있었는지 까먹어서강의가 엉망이 되었네요 ㅠㅜ ========================================================== 오늘의 결과물 === AlertView + TableView 되겠습니다...! 오늘의 아이폰 결과물만 거의 3개... 어제 루아강의를 못쓴것이 한으로 남아, 쭉쭉 올립니다 >ㅅㅅ< 뿌뿌뿌뿌뿌뿌 그리고, 이제, 요 아래부분을 ... 일이 또 생겼넴.. 2012. 4. 29.
How does UITableViewCell reorder, expand/shrink work ? So you spent way too much time in figuring out how to make UITableview collapsible, you are at the right tutorial.This sample code, I have written is a more like a template which developers can take and use in their own application customize it according to their need. It basically deals with TableView property of reordering, expanding and shrinking. Here are some screenshots which display the w.. 2012. 4. 28.
Animate UITableView Cell Height Change NERD ALERT! This is a tech article, the faint of heart should browse on… Overview Well this is going to be a fairly short article, but I just wanted to share with you a snippet of magic I discovered quite some time ago. It is something that I posted on StackOverflow and to date is the most up-votes I have received on there, with votes coming in pretty much every day. The magic is in how you can .. 2012. 4. 28.
TextField 특정 문자만 사용하도록 하기 Xcode의 TextField 사용할때 특정 문자만 입력 받도록 하기 위해서는 다음과 같이 한다. 예) 숫자와 영문자만 입력 받기 #define LEGAL_TEXT@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz " - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet *cs = [[NSCharacterSet characterSetWithCharactersInString:LEGAL_TEXT] invertedSet]; NSString *filt.. 2012. 4. 28.
objective c 수학함수 Objective-C 에서 가장 많이 쓰는 수학함수 모음입니다. ceil() – 올림값 NSLog(@"ceil(1.2) : %0.2f", ceil(1.2)); -> ceil(1.2) : 2.00 NSLog(@"ceil(1.8) : %0.2f", ceil(1.8)); -> ceil(1.8) : 2.00 NSLog(@"ceil(1.2) : %0.2f", ceil(-1.2)); -> ceil(-1.2) : -1.00 NSLog(@"ceil(1.8) : %0.2f", ceil(-1.8)); -> ceil(-1.8) : -1.00 floor() – 버림값 NSLog(@"floor(1.2) : %0.2f", floor(1.2)); -> floor(1.2) : 1.00 NSLog(@"floor(1.8) : %0.2f.. 2012. 4. 28.
iPhone UITableView with animated expanding cells tutorial Hello everyone, This is a tutorial which will go over creating a UITableview where the cells will expand and contract with user interaction. This is a preview of the project: - Before any cell is selected - - After a cell is selected – Prerequisits: Before beginning this tutorial you should be familiar with basics of development and especially the basics of working with UITableViews. Lets get St.. 2012. 4. 26.
테이블뷰 마지막 셀보이기(카카오톡 처럼) [table reloadData]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[table numberOfRowsInSection:0] - 1 inSection:0]; [table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO]; 2012. 4. 26.
TableView에서 긴글을 표시할때 Row 높이를 다이나믹하게 조정하기 TableView를 이용해서 SNS를 개발 하기위해 선두지점에 있는 Facebook 앱을 보았다. 이렇게 Label이 길수록 TableView cell row가 길게 나왔다. 이렇게 할려면 글을 길이를 계산해서 row의 높이를 계산해야 한다. #define FONT_SIZE 14.0f #define CELL_CONTENT_WIDTH 320.0f #define CELL_CONTENT_MARGIN 10.0f 일단 사이즈를 계산하기 위해 고정적인 정보를 정의 했다. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; { NSString *text = [items objectAtIndex:[i.. 2012. 4. 26.