본문 바로가기

모바일개발(Mobile Dev)187

블록 객체 정의 * 참조 : http://minsone.github.io/mac/ios/how-to-using-block-in-objc/ 블록 객체는 C언어의 확장이며 비표준입니다.(wikipedia 참조) 다른 언어에서 클로저(closure) 또는 익명함수, 람다함수, 일급 객체(first-class object)라고 합니다.우선 Objective-C에서 다루므로 블록 객체라고 하겠습니다.블록 객체 정의블록객체는 다음과 같은 조건을 만족합니다.(wikipedia 참조)변수나 데이터 구조안에 담을 수 있다.파라미터로 전달 할 수 있다.반환값(return value)으로 사용할 수 있다.할당에 사용된 이름과 관계없이 고유한 구별이 가능하다.블록은 다음과 같이 설명할 수 있습니다. 또한, 블럭 객체이므로 id형태로 저장이 .. 2015. 9. 29.
Custom UITableViewCell example in iOS Custom UITableViewCell example in iOSJanuary 29, 2015 by Manishankar 0 Comments We have already worked on implementing an UITableView in ios development. So now let’s move further. In this tutorial I am going to implement custom UITableViewCell as an additional part of the previous UITableView tutorial. UITableView is an collection of UITableViewCell’s. It defines the attributes and behaviour of.. 2015. 9. 19.
UIDatePicker example in iOS UIDatePicker example in iOSFebruary 9, 2015 by Manishankar 1 Comment In the previous tutorials we have worked around custom UITableViewCell and UIWebView. Now in this tutorial I am going to show you how to implement an UIDatePicker in iOS development. UIDatePicker is used to select a specific date and time in the iOS app development process. UIDatePicker class implements an object that uses mult.. 2015. 9. 17.
Creating Custom UITableViewCell using Nib (.xib) files in XCode Creating Custom UITableViewCell using Nib (.xib) files in XCodeThe ‘proper’ way This brief tutorial will demonstrate two things:The simplest way to create a custom UITableViewCell: A lot of new iOS developers seem to struggle with this. Depending on where they look, they are shown a variety of possible ways of accomplishing this, some of which are pretty bad to say the least. This article aims t.. 2015. 9. 15.
self.myVar myVar _myVar 가끔씩 맥이나 iOS 관련 개발 카페등을 보면, 2014년이 시작된 지금까지도 Objective C의 문법중 @synthesize에 관해 물어보는 분들이 계십니다. (참고로, Object C(오브젝트 C) 아닙니다. Objective C(오브젝티브 C) 입니다. 이거 헷갈리시는 분들이 있더군요.) 아마도, 조금 오래된 책으로 공부하거나(최근 책들은 보지 못했습니다만...) 예전에 작성되었던 소스들을 보면서 공부하기 때문인것 같습니다. 그런데, 사실 이제는 2012년 중반 이후로 Modern Objective C가 나온 이후 부터는 @synthesize는 더이상 사용할 일이 거의 없습니다. (정확히 버전은 기억나지 않지만 XCode 4.5정도 이후부터는 Modern Objective C가 지원 될겁니다.).. 2015. 9. 15.
iOS 개발자료 잡동사니 iOS 개발자료 잡동사니upthere9.egloos.com/2821719펌 :http://improgrammer.com/12 http://cafe.naver.com/mcbugi/67700KT앱 대회 준비하면서 모은 자료들을 정리해서 올립니다. 개인 학습용으로 모은 자료들이라 출처가 틀릴 수도 있습니다. 답글 주시면 수정토록 하겠습니다. -푸쉬 서버 개발 관련 자료- 이지 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-se.. 2015. 9. 15.
NSDate NSTImeInterval NSDate +date 메서드는 가장 기본적인 메서드로 현재의 일시를 가져다 준다. 현재 날짜를 구한다. NSDate *now = [NSDate date]; > 현재 일시로부터 지정된 초 만큼 경과한 일시를 구하는 메서드 +(id) dateWithTimeIntervalSinceNow: (NSTimeInterval) seconds; seconds: 현재로부터 경과된 초 단위의 수치를 지정. +가 미래 , -가 과거 반환값 : 현재부터 지정된 초 단위의 수치만큼 경과한 일시의 인스턴스 //현재로부터 10초 후의 일시를 취득하는 예 NSDate *date = [NSDate dateWithTimeIntervalSinceNow:10.0f]; NSTimeInterval은 시간길이를 초 단위로 다루는 것으로 doub.. 2015. 9. 11.
NSArray & NSMutableArray NSArray & NSMutableArrayNSArray *arr = [[NSArray alloc] initWithObjects:@"a", @"b", @"c", nil];NSMutable *mtarr = [[NSMutable alloc] initWithObject:@"a", @"b", @"c", nil]; 이 두 배열의 차이점은NSArray는 생성/초기화 후에는 수정/추가/삭제가 불가능하지만 NSMutable은 가능하다는 것이다. by http://meetkei.com/?p=807 // 빈 배열 생성 NSArray* arrEmptyArray = [NSArray array]; NSMutableArray* arrEmptyMutableArray = [NSMutableArray array]; // 특정 크기의 .. 2015. 9. 11.
NSString 문자열 다루기 // 빈 문자열 생성 str3 = [NSString string]; // 문자열로 새로운 문자열 생성 str3 = [NSString stringWithString:@"stringWithString"]; NSLog(@”%@”, str3);str3 = [[NSString alloc] initWithString:@”initWithString”]; NSLog(@”%@”, str3); [str3 release]; // 문자열 길이 NSLog(@”length of %@ : %i”, str1, [str1 length]); NSLog(@”length of %@ : %i”, str2, [str2 length]); // 문자열 복사 tmp = [NSString stringWithString:str1]; NSLog(@”tm.. 2015. 9. 9.