상세 컨텐츠

본문 제목

[iOS 개발] pickerView:numberOfRowsInComponent

헉!!/iOS

by 권태성 2011. 9. 14. 21:17

본문


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

관련글 더보기

댓글 영역

페이징