J'ai besoin de redimensionner la même taille d'image dans uitableviewcell. J'utilise la même page, n'utilisant pas l'autre vue. J'ai tout placé et j'ai couru. Mais je ne pouvais pas placer correctement positionné comment faire cela. Merci d'avance. Voici le codeComment redimensionner l'image de cellule 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");
}
image de l'image est
Checkout ces suggestions: [SO post] (http://stackoverflow.com/questions/1055495/uitableviewcells-imageview-fit-to-40x40) Et ceci [post SO] (http://stackoverflow.com/ questions/2788028/how-do-i-make-uitableviewcells-imageview-a-fixed-size-pair-when-the-image-is-sm) – user523234