Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I display a specific text related to a specific date using date picker?
    primarykey
    data
    text
    <p>I'm new to iOS and I'm not familiar with all its APIs. I found out how to display the selected date in a textfield, but I don't know what to write to display a specific (chosen) text related to a specific date.</p> <p>This is the codes I have used to display the date. Do you know what I need to change to be able to write my own texts to specific dates?:</p> <pre><code> #import "ViewController.h" @implementation ViewController @synthesize datePicker; @synthesize dateLabel; - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [self setDateLabel:nil]; [self setDatePicker:nil]; [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } - (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (IBAction)touchButton:(id)sender { NSDate *dateSelect = [datePicker date]; NSString *dateStamp = [[NSString alloc]initWithFormat:@"The date is %@", dateSelect]; dateLabel.text = dateStamp; } @end </code></pre> <p>(I have a button, the date picker and a text field)</p> <p>I would really appreciate your answers.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload