2
A
回答
0
用1px創建一個UIView作爲width和gray作爲backgroundColor,並將這添加到複選標記的右側應該沒問題。
0
如果你編輯選項是一個圖像,那麼你可以做下面的代碼來顯示一行。
步驟
1]首先進口QuartzCore/QuartzCore.h
2]設置邊框的寬度和你的編輯圖像的邊框顏色屬性。
[editImageView.layer setBorderWidth:2.0];
[editImageView.layer setBorderColor:[[UIColor grayColor] CGColor]];
//If you putting a button for edit then also you can set the same. Just replace the editImageView with your editButton
希望你得到確切你想要:)
5
看看這個!
申報BOOL對號;在.h 檢查其值。
// This all code in Cell For Row At IndexPath :
for (UIView *ObView in [cell.contentView subviews])
{
[ObView removeFromSuperview];
}
if(checkMark == YES) // you can check here by imdexPath.row.
{
UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(10,5,150,30)];
lbl.text = @"";
[cell.contentView addSubview:lbl];
UIImageView *CheckImage = [[UIImageView alloc]initWithFrame:CGRectMake(160,5,20,20)];
CheckImage.image = [UIImage imageNamed:@""];
[cell.contentView addSubview:CheckImage];
UIImageView *BarImage = [[UIImageView alloc]initWithFrame:CGRectMake(185,5,0.5,30)];
BarImage.image = [UIImage imageNamed:@""];
[cell.contentView addSubview:BarImage];
UIImageView *tblImage = [[UIImageView alloc]initWithFrame:CGRectMake(160,5,20,20)];
tblImage.image = [UIImage imageNamed:@""];
[cell.contentView addSubview:tblImage];
}
else
{
UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(10,5,150,30)];
lbl.text = @"";
[cell.contentView addSubview:lbl];
UIImageView *tblImage = [[UIImageView alloc]initWithFrame:CGRectMake(160,5,20,20)];
tblImage.image = [UIImage imageNamed:@""];
[cell.contentView addSubview:tblImage];
}
注意:幀是臨時的。
1
因此,你基本上有一個tableView
,你想添加該圖像「|」在你編輯時你的tableViewCell
。
我會假設你已經有editingEnabled
您的tableView,你將需要實現
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
{
if (editing) {
// Configure self.tableView and individual cells and add the "|" as a subView.
// It will all be tricky, and you should be able to logically place the vertical bar
// But whatever you want to be in your EDIT mode, you will have to configure it here.
} else {
// Re-configure and implement the 'correct' cells back to normal tableView
}
}
0
採取的UIImageView表格單元格,並根據您的tablename.cell.height其寬度設置爲1,設置高度。
它肯定會解決你的問題
0
你可以定製你的tableview cell.Just在細胞創建時添加子視圖,換上編輯按鈕,它隱藏起來,直到點擊。
相關問題
- 1. 如何在TextField中編輯時顯示TableView而不是鍵盤?
- 2. 如何在點擊單元格時顯示tableview單元格編輯視圖?
- 3. 如何顯示圖像進行編輯?
- 4. 編輯時顯示EditViewController,不編輯時顯示DetailViewController
- 5. 編輯tableview的行高Swift
- 6. 如何在iPhone中編輯TableView?
- 7. 編輯UITextField時顯示UIPickerView
- 8. TableView不顯示行
- 9. TableView不顯示行
- 10. 如何在Android中編輯時在編輯文本中顯示清除按鈕
- 11. jqgrid - 如何顯示編輯表單,當點擊行時?
- 12. 如何在視圖加載時顯示某個tableView行
- 13. 如何在Sitecore體驗編輯器中顯示「編輯圖像」?
- 14. MvcSiteMapProvider僅在編輯mvc.sitemap時顯示mvc4
- 15. 如何在編輯時在JTable單元格上顯示文本
- 16. 在編輯或添加jqGrid時隱藏該列並顯示該字段
- 17. 如何在TableView的每一行中編輯相同的UILabel
- 18. 如何在編輯TableView時禁用推視圖
- 19. 在設計時顯示一個MultilineStringEditor以編輯編輯控件的行?
- 20. 類型編輯在TableView中
- 21. 如何顯示組tableview android?
- 22. 如何在編輯行時在下拉列表中顯示當前值
- 23. 程序採取行編輯和顯示行輸入編輯
- 24. 如何讓UIToolbar顯示在Storyboard中進行可視化編輯
- 25. 當使用javascript單擊編輯按鈕時,該行如何編輯?
- 26. 如何在顯示wxGrid編輯器時捕獲KeyEvents
- 27. 如何在顯示類名之間的空格時編輯CSS?
- 28. Android Studio:如何在顯示activity_main.xml預覽的同時編輯colors.xml?
- 29. 如何在編輯表單時顯示預先檢查的UITableViewCells。
- 30. 如何在顯示UIViewController時讓鍵盤編輯字段?