I'm trying to pass a string from a ViewController (VC)
to a CollectionViewController (CVC)
I have a UIButton
on VC with a triggered segue of show
linked to the CVC.
In my VC, i have prepareForSegue
as follows
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"gotoImages"]) {
CQTaskPhotosCVC *vc = segue.destinationViewController;
vc.queueID = _idCode;
}
}
in my CVC.h
@interface CQTaskPhotosCVC : UICollectionViewController
@property (nonatomic, strong) NSString *queueID;
@end
and heres the error i get
2016-02-02 12:05:45.015 CactusQueue[41739:6063627] -[UICollectionViewController setQueueID:]: unrecognized selector sent to instance 0x12836e410
2016-02-02 12:05:45.017 CactusQueue[41739:6063627] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICollectionViewController setQueueID:]: unrecognized selector sent to instance 0x12836e410'
I've passed data between VC using segues before and I've never come across this issue. removing vc.queueiD = _idCode;
doesn't result in a crash so i don't know if I'm just overlooking something stupid or what.
what do?
UIViewController
toCQTaskPhotosCVC
? – Larme