uitableviewcell에서 같은 이미지 크기의 크기를 조정해야합니다. 다른 뷰를 사용하지 않고 동일한 페이지를 사용하고 있습니다. 나는 모든 것을 놓고 달렸다. 그러나 나는 그 일을 올바르게 할 수있는 방법을 제시 할 수 없었다. 미리 감사드립니다. 여기 코드입니다uitableview 셀 이미지의 크기를 조정하는 방법은 무엇입니까?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
int count = 0;
if(self.editing && indexPath.row != 0)
count = 1;
if(indexPath.row == ([imarry count]) && self.editing)
{
cell.textLabel.text = @"ADD";
cell.image= [UIImage imageNamed:@""];
return cell;
}
cell.textLabel.text = [arry objectAtIndex:indexPath.row];
cell.image=[imarry objectAtIndex:(indexPath.row)];
return cell;
}
- (void)imagePickerController:(UIImagePickerController *)UIPicker didFinishPickingImage:(UIImage *)info editingInfo:(NSDictionary *)dictionary
{
[UIPicker dismissModalViewControllerAnimated:NO];
[imarry insertObject:info atIndex:[imarry count]];
[Table reloadData];
NSLog(@"Uploaded image");
}
이미지 사진은 이미지 속성은 아이폰 OS 3.0에서 더 이상 사용되지 않습니다
다음 제안 사항을 확인하십시오. [SO post] (http://stackoverflow.com/questions/1055495/uitableviewcells-imageview-fit-to-40x40) 그리고이 [SO post] (http://stackoverflow.com/ 질문/2788028/how-do-make-uitableviewcells-imageview-a-fixed-size-even-when-image-is-sm) – user523234