What I want to do is when user select a district from UITableView in Swift, I'm taking the district name and add .png to it and send the image name variable into Objective-C file and inside it I'm creating UIImageView.
This is my code inside my Objective-C .h file,
@property (weak, nonatomic) NSString *mapImage;
This is how I assign value to it from Swift UITableView when user click on UITableView (didSelectItemAtIndexPath),
selectesState = namesArray[indexPath.row]
let temp :String = selectesState + ".png"
let instanceOfCustomObject: StateMapPinView = StateMapPinView()
instanceOfCustomObject.mapImage = temp
This is the Objective-C code I'm setting the image in .m file (ViewDidLoad),
UIImage *image = [UIImage imageNamed:_mapImage];
_myView = [[VIPhotoView alloc] initWithFrame:self.view.bounds andImage:image];
_myView.autoresizingMask = (1 << 6) -1;
[self.view addSubview:_myView];
But it keeps returning null value.
Whats wrong with my code?