ios - UIDatePicker and UITextView -


I want to show a text in UITextView depends on the date, in "something" Day App ", I have this code implementation

  - (zero) Changing text: (ID) sender {NSDateFormatter * df = [[NSDateFormatter alloc] init]; Df.dateStyle = NSDateFormatterMediumStyle; Label.text = [NSString stringWithFormat: @ "% @", [df stringFromDate: datePicker.date]]; NSDictionary * pgdata = [[datasource shareddatasource] datafowage: page index]; NSString * dateText = [pddata objectforekey: @ "page name "]; NSString * dateInfo = [df stringFromDate: d AtePicker.date]; ([dateTextEqualToString: dateInfo]) {myText.text = [pageadata objectFor: @ "pagetext"];} [DF release];}  

My qustion UITextView is the way to update NSDictionery ForKey @ "pageText" with data, since it only shows the first object.

Here is the date when I Date was selected, it is the object that I want to triger.

  - (id) init {self = [super init]; If (self! = Zero) {data page = [[NSARLAOC] initWithObjects: [NSDC Dictionary with Object Ends: @ "October 3, 2009", @ "PageName", @ "First Object", @ "PageText", Zero], [NSDIPTION Dictionary "OK 27, 2009", @ "PageName", @ "Third Object", @ "Page 10", @ "PageName", @ "Page Item", @ "Page Text", NULL] ", @" Page text ", zero], zero];} healthy return;}  

Not that I understand your question, But I think that you need it to make the object from your dictionary in an NSString like this:

  - (zero) change text: (ID) sender {NSDateFormatter * df = [[NSDateFormatter alloc] init]; Df.dateStyle = NSDateFormatterMediumStyle; NSDictionary * pgdata = [[Datasource shareddatasource] DataForages: Page Index]; NSString * dateText = (NSString *) [pageadata Objective: @ "PageName"]; NSString * dateInfo = [Df stringFromDate: datePicker.date]; Label.text = [NSString stringWithFormat: @ "% @", [df stringFromDate: dateInfo]]; If ([dateTextEqualToString: dateInfo]) {myText.text = dateText; } [DF release]; }  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -