我正在做一個項目,我必須展示一個像這樣的視圖,我試圖使用表視圖,但我無法實現,之後,我決定實現這與集合view.but的幫助,但沒有發生富有成果。我在這裏感到沮喪,因爲我的觀點沒有什麼可以發生。這些是在視圖上添加的文本字段,並且都是可點擊的,任何人都可以幫助我,因爲我是新鮮人,所以請幫助我。如何在uicollection視圖中添加文本框?
0
A
回答
0
//////////////////
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
if(section==0)
{
return self.view_header;
}
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
CGFloat height =0.00;
if(section==0)
{
height = 32;
}
return height;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section == 1)
{
return 51;
}
else
{
return 35;
}
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if(self.flag_loadCompleted == TRUE)
{
return 1;
}
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if(section == 0)
{
return [self.arr_data count];
}
else if(section == 1)
{
return 1;
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"MyTemplate";
MyFinancialTemplate *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil)
{
cell = [MyFinancialTemplate createNewTextCellFromNib];
}
cell.index = indexPath.row;
if(indexPath.section == 0)
{
cell.index = indexPath.row;
cell.flag_loader = FALSE;
cell.selectionStyle = UITableViewCellSelectionStyleGray;
}
else
{
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.flag_loader = TRUE;
}
[cell LoadCell];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
+0
好吧,我會嘗試這個。感謝您的幫助,並請告訴我如何得到每個文本域的響應。 – Priyanka
+0
使用文本字段的代表 –
相關問題
- 1. 如何使用Swift在UICollection View Cell中添加表視圖?
- 2. 如何在日曆視圖日期框中添加文本
- 3. 如何將陰影添加到uicollection視圖? IOS
- 4. 如何在文本視圖後添加數字和框架
- 5. 在文本視圖下添加視圖
- 6. 如何在圖庫視圖中的圖像上添加文本
- 7. 如何在不同視圖中添加文本視圖和圖像視圖
- 8. 如何在文本中添加邊框?
- 9. 如何在添加新數據時添加新文本視圖
- 10. 在地圖中添加文本框
- 11. 從添加視圖中將文本框轉換爲下拉框
- 12. 如何在VB.NET中的富文本框中添加圖像
- 13. 如何在html中添加文本框中的圖片?
- 14. 在重複文本視圖之前添加文本視圖
- 15. 如何在餅圖中添加文本?
- 16. 如何在AlertDialog框中添加兩個編輯文本字段或視圖?
- 17. Android將圖像添加到文本(在文本視圖中)?
- 18. 如何將圖像,文本或視頻添加到視頻中
- 19. 不可能將單元添加到UICollection視圖
- 20. 如何在網格視圖中添加文本結束
- 21. 如何在android studio中爲文本視圖添加動畫
- 22. 添加圖標視框中
- 23. 將文本從文本框添加到列表視圖列
- 24. 如何在sencha touch的文本框中添加圖片
- 25. 如何使用jquery在文本框中添加背景圖片
- 26. 如何將文本視圖添加到常規視圖
- 27. UIcollection視圖不滾動?
- 28. UICollection視圖隱藏UINavigationBar
- 29. UIcollection視圖顯示堆疊在單個視圖中的圖像
- 30. 如何在aChartEngine圖下添加文本視圖
我認爲這是可以用分組的tableView的幫助下完成的。檢查文檔http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/tableviewstyles/tableviewcharacteristics.html – iCoder
這可以通過使用tableview來定製它的單元格。 –
@Norbert @Norbert我試過它的表視圖的幫助,但無法實現。請建議我一些其他方式 – Priyanka