Passing data from one viewcontroller to another
- by user1392515
I subclassed two view controllers.
The first one is supposed to pass data, a NSUrl object to the second one.
.m of the first one:
NSURL *temp = [NSURL URLWithString:@"http://example.com"];
UIViewController *presentationsFullScreen_ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PresentationsFullScreen_ViewController"];
presentationsFullScreen_ViewController.urlToUse = temp;
.h of the second one:
#import <UIKit/UIKit.h>
@interface PresentationsFullScreen_ViewController : UIViewController {
NSURL *urlToUse;
}
@property (nonatomic,retain) NSURL *urlToUse;
It is obviously not working and not compiling,telling me essentially that I didn't subclass it and that the property urlToUse is not found on UIViewController.
How do I subclass correctly?
Thanks!