मैं जानना चाहता हूं कि मैं क्या खो रहा हूं क्योंकि डिलीट बटन छुपाते समय मेरा सेल एनिमेट नहीं होता है। डिलीट बटन खत्म करने से पहले लेबल मूल स्थिति पर वापस कूदता है।कस्टम यूटेबलव्यूसेल सामग्री डिलीट बटन छुपाते समय एनिमेटेड नहीं है
जब मैं हटाएँ बटन दिखाने के लिए दौर संपादन दृश्य टैप करते हैं, लेबल एनीमेशन काम करता है:
लेकिन जब मैं इसे फिर से हटाएँ बटन को छिपाने के लिए नल, लेबल के आंदोलन नहीं है एनिमेटेड:
नोट: ये स्क्रीनशॉट निम्न कोड से नहीं बनाई गई हैं। लेकिन वे समस्या दिखाते हैं।
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
homeCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[homeCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
// Set up the cell
Consumed *drinkObj = [self.appDelegate.consumedDrinksArray objectAtIndex:indexPath.row];
cell.titleLabel.text = drinkObj.drinkName;
NSString *detailTextTime = [NSDate stringFromDate:drinkObj.dateConsumed withFormat:@"h:mma"];
NSString *detailTextrelative = [relativeDateTransformer transformedValue:drinkObj.dateConsumed];
NSString *detailText = [NSString stringWithFormat:@"%@ %@ ", detailTextTime,detailTextrelative];
cell.timeLabel.text = detailText;
cell.stdDLabel.text = @"999.0"; //[NSString stringWithFormat:@"%@", drinkObj.standardDrinks];
cell.stdDLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
cell.titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
cell.timeLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
मैं एक ही समस्या है , आपका वीडियो 404 है और वहां पर्याप्त कोड था। मुझे लगता है कि मैंने आपके प्रश्न में सुधार किया है। यदि आप इसे वापस रोल करने के लिए स्वतंत्र महसूस करते हैं। –
आपकी 'होमसेल' कक्षा कैसी दिखती है? आप किस तरीके से ओवरराइड कर रहे हैं? – Sulthan
विशेष रूप से, 'layoutSubviews' overriden है? – Sulthan