I cannot save the selected item from the array with a string value. Any idea what's wrong?
Its my code of compare:
if(self.detailItem){
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:[self.detailItem description] ofType:@"html"]isDirectory:NO]]];
NSString *value = (NSString *)self.detailItem;
NSString *value1 = (NSString *)@"DecideVectorVPiramidi";
value=[NSString stringWithFormat:@"%@", value];
value1=[NSString stringWithFormat:@"%@", value1];
if (value == value1) {
WebView.scalesPageToFit=YES;
}
This is the array code:
case 1:
switch (self.nomberInSection) {
case 0:
self.detailViewController.detailItem =[NSString stringWithFormat:@"%@", [DecideOfZakusPath objectAtIndex:indexPath.row]];
break;
}
break;
Type of detailItem
is id
.
For errors, I checked