ACEExpandableTextCell icon indicating copy to clipboard operation
ACEExpandableTextCell copied to clipboard

Optional methods not being called

Open timhibbard opened this issue 11 years ago • 3 comments

All the methods in the @optional tag are not being called:

- (void)tableView:(UITableView *)tableView updatedHeight:(CGFloat)height atIndexPath:(NSIndexPath *)indexPath;
- (BOOL)tableView:(UITableView *)tableView textView:(UITextView*)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
- (void)tableView:(UITableView *)tableView textViewDidChangeSelection:(UITextView*)textView;
- (void)tableView:(UITableView *)tableView textViewDidEndEditing:(UITextView*)textView;

My interface looks like this:

#import "ACEExpandableTextCell.h"

@interface PaymentDetail : UITableViewController<ACEExpandableTableViewDelegate>

The code that isn't called looks like:

- (void)tableView:(UITableView *)tableView textViewDidEndEditing:(UITextView*)textView{
    NSLog(@"tag=%ld",(long)textView.tag);
}

- (BOOL)tableView:(UITableView *)tableView textView:(UITextView*)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{

    NSLog(@"%@",text);
    return YES;
}

The method that is marked as required works great

- (void)tableView:(UITableView *)tableView updatedText:(NSString *)text atIndexPath:(NSIndexPath *)indexPath
{
    stop.copayPaymentType = text;
}

Am I missing something?

timhibbard avatar Nov 05 '14 16:11 timhibbard

Did you try to run the demo app? is the method "updatedHeight" called ?

acerbetti avatar Nov 06 '14 15:11 acerbetti

These optional method don't exist with the latest pod version. Are they removed or just not in sync with latest version ?

linked67 avatar Feb 22 '16 13:02 linked67

These method were introduced after the latest push on CocoaPods. I just updated it, please check it out

acerbetti avatar Feb 22 '16 18:02 acerbetti