我想在iPad的UITableViewCell中添加UITextView,出於某種原因,我的UITextView沒有佔用整個UITableViewCell的高度/寬度。以下是我聲明細胞UITableView中的UITextView iPad
UITextView *textView = [[UITextView alloc]initWithFrame:cell.frame];
[textView setBackgroundColor:[UIColor redColor]];
[cell.contentView addSubview:textView];
雖然它看起來像事先此
感謝。
您是否嘗試過使用'cell.contentView.frame'? – Ravi
是的,它不起作用 – VTS12
當您打印該框架時的結果是什麼? – Ravi