我寫了一個特殊的UITableViewCell。現在我需要獲取文本從一個文本框的從自定義UITableViewCell獲取textField.text
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
CustomCell *custumCell = [tableView cellForRowAtIndexPath:indexPath];
//warning: incompatible Objective-C types initializing 'struct UITableViewCell *', expected 'struct CustomCell *'
NSString *title = [custumCell cellTitle].text;
[self setArticleReaded:title];
[title release];
}
#import <UIKit/UIKit.h>
@interface CustomCell : UITableViewCell {
IBOutlet UILabel *cellTitle;
IBOutlet UILabel *cellSubTitle;
IBOutlet UILabel *cellPubDate;
}
@property (nonatomic, retain) IBOutlet UILabel *cellTitle;
@property (nonatomic, retain) IBOutlet UILabel *cellSubTitle;
@property (nonatomic, retain) IBOutlet UILabel *cellPubDate;
@end
我希望有任何人誰知道一種解決方法。