1
從靜態小區點擊該視圖控制器包括一個TableView中的靜態(定製)細胞時的UITextView進入全屏模式。一個行由一個UITextView其示出2行文字(如預覽)的。當用戶點擊它,它會開拓一個UITextView填滿全屏。使內的UITableView
else if (indexPath.row == 3) {
static NSString *countryRegionCellID = @"NotesCell";
NotesCell *cell = (NotesCell *)[tableView dequeueReusableCellWithIdentifier:countryRegionCellID];
if (!cell) {
NSArray* topLevelObjects = [[NSBundle mainBundle] loadNibNamed:countryRegionCellID owner:self options:nil];
for (id currentObject in topLevelObjects) {
if ([currentObject isKindOfClass:[NotesCell class]]) {
cell = (NotesCell *)currentObject;
break;
}
}
}
[self drawBorder:cell];
[self drawPersonalNotes:cell];
return cell;
}
UITextView的代表呼籲:
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
{
NSLog(@"textViewShouldBeginEditing");
[textView becomeFirstResponder];
CGRect r = [[UIScreen mainScreen] bounds];
[textView setFrame:r];
return YES;
}
- (void)textViewDidBeginEditing:(UITextView *)textView
{
NSLog(@"textViewDidBeginEditing");
}
由於靜態細胞具有確定的44高度的UITextView只填充單元,而不是全屏幕。我在桌子視圖的頂部放置了一個新的視圖控制器嗎?謝謝。
你設置的UITextView的代表? textViewShouldBeginEditing:被調用? – casillic 2013-02-17 00:24:53
是的。當委託被調用,它帶來了充滿電池一個UITextView。 – 2013-02-17 01:19:21