티스토리 뷰

728x90


UIPickerViewDataSource 프로토콜을 따르면 반드시 구현해야 하는 메소드로써 해당 컬림의 줄 개수를 반환합니다.

pickerView:numberOfRowsInComponent:

Called by the picker view when it needs the number of rows for a specified component. (required)

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
Parameters
pickerView

The picker view requesting the data.

component

A zero-indexed number identifying a component of pickerView. Components are numbered left-to-right.

Return Value

The number of rows for the component.

Availability
  • Available in iOS 2.0 and later.
Declared In
UIPickerView.h
728x90