본문 바로가기

아이폰 개발

[아이폰 개발]Swipe 기능 스와이프 기능에 대해 간략히 적어보겠습니다. ㄴ 이런식은 좀더 생각하면 답이 나올거 같습니다. 간단하게 좌우, 상하 정도입니다. 소스코드입니다. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; _gestureStartPos = [touch locationInView:self.view]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint curEndPos = [touch locationInView:self.view].. 더보기
야호~ 책 당첨! 올해는 먼가 괜찮은거 같아요. 초반에 신종플루 걸려서 삐꺽했지만.. ㅎ_ㅎ;; 느낌이 아주 좋습니다..!! 책에 대한 자세한 주소 http://mypickup.kr/tb/http://www.booktweet.co.kr/?mid=reviewer&document_srl=29800%23comment 위에 제 아이디가 있군요..!! 더욱더 아이폰 개발에 열중하라는 뜻으로 감사히 받겠습니다.. 올해 당첨된 목록 하나 추가네요.. 1. 베스킨라빈스 만원 (어제 꿀꺽했네요..) 2. 맥북에어 지금 사용중입죠.. ㅋㅋ http://carosy.tistory.com/entry/MacBook-Air 3. 아이폰4 개발책.. 기분이 너무 좋네요.. 앞으로도 아이폰4개발 열심히 할께요~ ps. 근데 아이폰5는 언제 나올려나... 더보기
자주 쓰는 NSString Method NSString ---------------------------------------------------------------------------- 문자열을 다루는데 사용됩니다. NSString *str = @"hello"; ---------------------------------------------------------------------------- 문자열 생성 +(id)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); c언어의 printf()과 같이 인수를 이용해, 새로운 문자열을 만들어서 반환합니다. NSString *str = [NSString stringWithFormat: @"first var %d, second.. 더보기
UITextField X Button Insert 'X' Button 삽입 방법은 아래와 같습니다. - (void)ViewDidLoad { ... ... ... YourTextField.clearButtonMode = UITextFieldViewModeWhileEditing; ... } 간단하죠^^ 즐거운 앱개발 되시길~ 더보기
FlowCover reload 안녕하세요. 아이폰의 사진 기능인 커버플로우(Coverflow)를 사용할때 화면 Refresh, Reload 하는 방법입니다. FlowCoverView.m - (void)redraw { [cache emptyCache]; [self setNeedsDisplay]; [self draw]; } 이 함수를 추가 해 주시고, 리로드 하는 뷰에서 콜하면 됩니다. 감사합니다. 더보기
iAds - 광고 달아보기! 아이폰 App에 들어가는 광고를 달아보겠습니다. 바로 소스파일부터 보겠습니다. *.h 입니다. #import @interface xxx : UIViewController { ... ... ADBannerView *bannerView; BOOL bannerIsVisible; } - (void)createBannerView; @property (nonatomic, retain) ADBannerView *bannerView; @end 그리고 *.m 파일입니다. @synthesize bannerView; - (void)viewDidLoad { ... bannerIsVisible = NO; [self createBannerView]; } #pragma mark - #pragma mark iAds create - .. 더보기
아이폰 OS 개발 자료 총정리 -푸쉬 서버 개발 관련 자료- 이지 APNS 오픈 소스 라이브러리 http://www.easyapns.com/ 구글 코드 APNS 오픈 소스 http://code.google.com/p/apns-php/ 서버 튜토리얼 http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/ -label이나 textView에 현재 시간을 표시하고 싶습니다- NSDate *t = [NSDate date]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; NSString *timeStr = [formatter setDateFormat:@"HH.. 더보기
Xcode - NavController : Title 색 변경하기 NavigationController 의 toolbar 제목 및 색변경을 할려고 하는데 조금 애먹었네요. (초보 개발자..ㅠㅠ) 여기저기 검색해본 결과, UILabel을 만들어서 값을 넘겨주니 되더라구요. 소스는 아래와 같습니다. // navigation contorl bar title color UILabel *titleLabel = [[UILabel alloc] init]; titleLabel.frame = CGRectMake(0, 0, 250, 100); titleLabel.backgroundColor = [UIColor clearColor]; titleLabel.textColor = [UIColor greenColor]; titleLabel.text = @"Title Name"; UIFont *g.. 더보기
xCode NSString 문자열 처리방법 NSString initWithFormat 문자열 연결에 사용할 수 있다. NSString *s1 = @"abc"; NSString *s2 = @"def"; NSString *s = [[NSString alloc] initWithFormat(@"%@-%@", s1, s2); NSLog(@"%@", s); UITextField에 값 설정하기 (IBOutlet) UITextField *Text1; [Text1 setText:[NSString stringWithFormat: @"%d" ,sum] NSString 비교 NSString *ch = button.currentTitle; if (![ch compare: @"1"]) { NSLog(@"downButton : 1"); } String to Integer .. 더보기