Why can not I lbl_esdeger.text string value? Thanks for help
selectedCountry = @”Kanıt”;
lblText.text = selectedCountry;
titlearray = [[NSMutableArray alloc]init];
//KANAL D
[titlearray addObject:@"Annem Uyurken"];
[titlearray addObject:@"Arka Sokaklar"];
[titlearray addObject:@"Kanıt"];
[titlearray addObject:@"Kötü Yol"];
int i;
for (i=0; i<[titlearray count]; i++)
{
if ([titlearray objectAtIndex:i] == selectedCountry)
{
lbl_esdeger.text = [titlearray objectAtIndex:i];
NSLog(@"--- %@ --- %@",[titlearray objectAtIndex:i],selectedCountry);
}
}
You should compare strings using the method
isEqualToStringin the if condition: