Do Not Think!!!
NSDate
, timeIntervalSinceReferenceDate
, provides the basis for all the other methods in the NSDate
interface. This method returns a time value relative to an absolute reference date—the first instant of 1 January 2001, GMT.[/CODE][CODE]NSManagedObject
represents date attributes using NSDate
objects, and stores times internally as an NSTimeInterval
value since the reference date (which has a time zone of GMT). Time
zones are not explicitly stored—indeed you should always represent a
Core Data date attribute in GMT, this way searches are normalized in the
database. If you need to preserve the time zone information, you need
to store a time zone attribute in your model. This may again require you
to create a subclass of NSManagedObject
.[/CODE]이 기본 키보드 대신 UIPickerView 또는 UIDatePicker 등을 사용하고 싶을 때가 있습니다.
이 경우 iOS 3.2 부터 생긴 inputView 속성을 이용하면 간단하게 커스텀 키보드를 이용할 수 있습니다.
기본 키보드 사용
[CODE]UITextField textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 300, 40)];[/CODE]
[CODE]UIPickerView *pickerView = [[[UIPickerView alloc] initWithFrame:CGRectMake(0, 10, 320, 216)] autorelease];
pickerView.delegate = self;
pickerView.dataSource = self;
pickerView.showsSelectionIndicator = YES;
UITextField textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 300, 40)];
inputField.inputView = pickerView;[/CODE]