У меня есть рассказ, который содержит пользовательский интерфейс просмотра. Вот обычное определение класса.
@interface CustomTableCellview : UITableViewCell {
UILabel *titleOfPost;
UILabel *userProfileName;
UIImageView* profileImage;
UILabel *countOfFave;
}
@property(nonatomic,retain) IBOutlet UIImageView *profileImage;
@property(nonatomic,retain) IBOutlet UILabel *titleOfPost;
@property(nonatomic,retain) IBOutlet UILabel *countOfFave;
@property(nonatomic,retain) IBOutlet UILabel *userProfileName;
Все эти значения показаны в моей таблице. Я хочу вызывать функцию всякий раз, когда пользователь нажимает кнопку ON / OFF. Вот мое определение класса tableview.
@interface VIPsScreen : UITableViewController {
NSMutableArray* tableList;
IBOutlet CustomVIPCell *tblCell;
NSMutableArray* chengdArray;
}
Я хочу сохранить все связанные "userProfileName" в массиве "chengdArray", который имеет значения UISWitch "ON". Как я решу эту проблему.
Заранее спасибо