Tuesday, February 3, 2009
at
9:05 PM
|
I'm working on a tutorial from the IPhone Development book I posted a link too. I came across something that I hadn't seen before.
- (NSInteger) pickerView: (UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
return [pickerData count];
}
At first, I wasn't sure what this meant so I did a little research. It looks like it has two method names. It sort of does. This is how you pass multiple parameters to a method in Objective-C. The method is pickerView:numberOfRowsInComponent and it takes as parameters (UIPickerView *)pickerView and (NSInteger) component and returns an integer.
- (NSInteger) pickerView: (UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
return [pickerData count];
}
At first, I wasn't sure what this meant so I did a little research. It looks like it has two method names. It sort of does. This is how you pass multiple parameters to a method in Objective-C. The method is pickerView:numberOfRowsInComponent and it takes as parameters (UIPickerView *)pickerView and (NSInteger) component and returns an integer.
Posted by
JP
0 comments:
Post a Comment