Pages

Friday, August 9, 2013

datepicker objects

Hi, I've just finishing copying a datePicker example from a book ( iOS 6 development in 24 hours) , and I've noticed that no instance of the picker object is used, but just a "dragged in"picker from the library on to a view?.  i thought i had to create an instance of a picker and declare it in the header file of a view?.  Any way , the value of picker is accessed by the method

-(IBaction)  setDateTime:(id) sender {

            [( viewController *) self.delegate calculateDateDifference:( (UIDatePicker *) sender).date];

}

I guess this code won't make much sense unless you've seen the rest of the exercise,  but my point  is… is Xcode able to select the only picker object in this way in a view without being more specific ?

apologies if this a ridiculous question, its all a bit new to me still.

 

 

p.s the book is great (although 1 hour per chapter is a bit of a stretch!!) ,and have a million questions about other stuff in the book, but i dont know of any forums dedicated to the book. unless anybody else does?


View the original article here

0 comments:

Post a Comment