2010-12-10 3 views
0
I am using a UISplitViewController in my application. In this SplitViewController on the left hand side i have A NavigationController and on right side i have a DetailViewController. 

On my navigation controller i have UITableViewController which is used for navigating through the hierarchy of data. 

테이블에서 레코드 (셀)를 선택할 때 상세보기 컨트롤러에 세부 정보를 표시하려고합니다.ipad monotouch 응용 프로그램에서 둘 이상의 열을 추가하는 방법은 무엇입니까?

I want the data to be displayed in following format: 

Name:  Matthew 
Age:  24 
City:  Newyork 

My problem is, i dont know how to add more than one column in the UITableView. 

Another question is that how to edit the values from this table? 

I want to edit the cells from table. 

For example, i want to edit the details from above table to: 

Name: George Matthew 
Age:  24 
City: Newyork 


In short i want to place labels in the forst column and text boxes in the second column of my table. 

Please help me out. 

감사하는있는 tableview에서 네하

답변

0

에는 두 개의 열이없는 대신 당신은 하나의 컬럼 자체 하위 뷰를 추가 할 수 있습니다.

cellForRowIndex 대리인에서 수행 레이블을 만들면 해당 특정 셀에 해당하는 프레임 (x, y, 너비, 높이) 값을 할당 할 수 있습니다. 그런 다음이 레이블을 하위 뷰로 셀에 추가하십시오. 이제 레이블과 동일한 텍스트 필드에 대해 x 값을 높이면 tableview의 오른쪽에있게됩니다.

+0

안녕하세요, 아직 명확하지 않습니다. cellForRowIndex 델리게이트 란 무엇입니까? 우리는 셀의 내용을 선언하는 "GetCell"메서드에서 테이블의 각 셀에 레이블과 텍스트 상자를 추가해야한다고 말합니까? – Neha

+0

이 테이블에 대해 별도의 클래스 파일을 작성해야합니까, 아니면 내 DetailViewcontroller.cs 파일 자체에서이 테이블에 대한 하위 클래스를 만들 수 있습니까? – Neha

+0

이 두 튜토리얼 모두보기 http://doronkatz.com/ipad-programming-tutorial-hello-world http://blancer.com/tutorials/i-phone/77006/uitableview-adding-subviews-to-a-cells- 컨텐츠 - 뷰 / – iPrabu

관련 문제