iPhone アプリケーション
-
はてな touch/Hatena touch
-
LDR touch
-
テレビ番組表/TV Listings
-
LCD Clock by forYou Inc.
-
MyWebClip by forYou Inc.
-
MyWebClip LITE by forYou Inc.
-
Japan Subway Route Map by Studio Heat
-
こころくろっく by AppBank
-
英辞郎 on the WEB for iPhone by アルク
-
i-Radio by i-Radio
-
くるりんぱ性格診断 by 小学館
-
英辞郎検索ランキング(アルク) by アルク
-
kotobank - コトバンク by genesix
-
miil by frogapps
iPad アプリケーション
共著
2008-12-28
UICCalendarPickerの使い方
基本形
UICCalendarPicker *calendarPicker = [[UICCalendarPicker alloc] initWithSize:UICCalendarPickerSizeMedium]; [calendarPicker setDelegate:self]; [calendarPicker setSelectionMode:UICCalendarPickerSelectionModeMultiSelection]; [calendarPicker showInView:self.view animated:YES]; [calendarPicker release];
1. サイズを指定してインスタンスを作ります。
UICCalendarPicker *calendarPicker = [[UICCalendarPicker alloc] initWithSize:UICCalendarPickerSizeMedium];
2. デリゲートを設定します。
[calendarPicker setDelegate:self];
3. 選択モードを設定します。
単一選択: UICCalendarPickerSelectionModeSingleSelection
複数選択: UICCalendarPickerSelectionModeMultiSelection
範囲選択: UICCalendarPickerSelectionModeRangeSelection
[calendarPicker setSelectionMode:UICCalendarPickerSelectionModeMultiSelection];
デリゲート・メソッド
ボタン(「閉じる」「先月」「来月」「日付」)を押したとき、対応したメソッドが呼ばれます。
@protocol UICCalendarPickerDelegate<NSObject> @optional - (void)picker:(UICCalendarPicker *)picker pushedCloseButton:(id)sender; - (void)picker:(UICCalendarPicker *)picker pushedPrevButton:(id)sender; - (void)picker:(UICCalendarPicker *)picker pushedNextButton:(id)sender; - (void)picker:(UICCalendarPicker *)picker didSelectDate:(NSArray *)selectedDate; @end
データソース・メソッド
日付の属性によって、外観をカスタマイズします。
@protocol UICCalendarPickerDataSource<NSObject> @optional - (NSString *)picker:(UICCalendarPicker *)picker textForYearMonth:(NSDate *)aDate; - (void)picker:(UICCalendarPicker *)picker buttonForDateToday:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateWeekday:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateSaturday:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateSunday:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateMonthOut:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateOutOfRange:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateSelected:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDateBlank:(UICCalendarPickerDateButton *)button; - (void)picker:(UICCalendarPicker *)picker buttonForDate:(UICCalendarPickerDateButton *)button; @end
例えば、土曜日だけ別のボタンにするには次のようにします。
- (void)picker:(UICCalendarPicker *)picker buttonForDateSaturday:(UICCalendarPickerDateButton *)button { [button setBackgroundImage:[UIImage imageNamed:@"uiccalendar_cell_custom1.png"] forState:UIControlStateNormal]; }
iPhone用日付選択UIライブラリ、UICCalendarPickerを作りました。 - 24/7 twenty-four seven
トラックバック - http://d.hatena.ne.jp/KishikawaKatsumi/20081228/1230406232
リンク元
- 20 http://reader.livedoor.com/reader/
- 18 http://reader.livedoor.com/utility/iphone/
- 16 http://forum.ubuntulinux.jp/viewtopic.php?id=2168
- 14 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=asu&q=WICD+WPA2&btnG=検索&lr=lang_ja
- 12 http://www.apple-style.com/plus/index.html
- 11 http://b.hatena.ne.jp/t/iPhone
- 11 http://i.tagli.org/tagli/bb2e463e4a8
- 11 http://www.google.com/reader/view/
- 10 http://a.hatena.ne.jp/moto_maka/simple
- 10 http://d.hatena.ne.jp/haru-komugi/20081228/1230435319





















