タップして大きくしたい UITableviewcell があります。タップすると大きくなり、もう一度タップすると元の高さに戻りますが、トランジションがうまくいきません。セルをタップすると遷移がスムーズになり、セルの高さが大きくなる方法はありますか。
-(void) zoomInProperties
{
remedyTextLabel.lineBreakMode=UILineBreakModeWordWrap;
CGSize maximumLabelSize=CGSizeMake(270.0,100.0);
CGSize expectedLabelSize=[remedyTextLabel.text sizeWithFont:remedyTextLabel.font constrainedToSize:maximumLabelSize
lineBreakMode:UILineBreakModeWordWrap];
NSLog(@"Height=%f",expectedLabelSize.height);
NSLog(@"Width=%f",expectedLabelSize.width);
if (expectedLabelSize.height>17 || expectedLabelSize.width > 260.0)
{
CGRect newFrame= remedyTextLabel.frame;
newFrame.size.height = expectedLabelSize.height;
newFrame.origin=CGPointMake(43.0,24.0);
remedyTextLabel.numberOfLines=(expectedLabelSize.height/17);
remedyTextLabel.frame= CGRectMake(43.0, 24.0, 270.0, expectedLabelSize.height);
blackRemedyTxtImageView.frame=CGRectMake(0.0, 13.0, 320.0,expectedLabelSize.height+13.0);
remedyImage.frame=CGRectMake(0.0, 75.0, 320.0,83.5);
remedyLabel.frame=CGRectMake(27.0, 85.0,183.0,58.0);
notifyMe.frame = CGRectMake(350.0, 69.0, 66.0, 33.0);
backgroundCellImage.frame=CGRectMake(0.0, 0.0, 320.0,130.5);
RemedyCustomCellView.frame=CGRectMake(0.0,0.0, 320.0, 136.5);
}
}
}
// ZoomOutProperties Method
-(void) zoomOutProperties
{
NSLog(@"zoom out");
remedyTextLabel.numberOfLines=1;
remedyTextLabel.frame=CGRectMake(43.0,22.0 ,270.0,17.0);
remedyTextLabel.backgroundColor=[UIColor clearColor];
remedyTextLabel.lineBreakMode=UILineBreakModeTailTruncation;
remedyImage.frame=CGRectMake(0.0, 46.0, 320.0, 83.5);
remedyLabel.frame=CGRectMake(27.0,55.0 ,183.0,58.0);
blackRemedyTxtImageView.frame=CGRectMake(0.0, 13.0, 320.0,30.5);
backgroundCellImage.frame=CGRectMake(0.0, 0.0, 320.0,129.5);
RemedyCustomCellView.frame=CGRectMake(0.0,0.0, 320.0, 129.5);
notifyMe.frame = CGRectMake(350.0, 69.0, 66.0, 33.0);
}