Incopatible Pointer to integer conversion sending nsstring to parameter of type 'NSUIInteger'

StackOverflow https://stackoverflow.com/questions/14708082

  •  06-03-2022
  •  | 
  •  

문제

i am getting this warning "Incopatible Pointer to integer conversion sending nsstring to parameter of type 'NSUIInteger' (aka unsigned Int)" in the below statement how to resolve this please guide Thanks in advance.

    DetailTitLbl.text=[lat_long_Array objectAtIndex:parTbl.placemark_Title];

parTbl.placemark_Title--> is of type string stored in the core data table. Any guidance will be greatly appreciated.

도움이 되었습니까?

해결책

DetailTitLbl.text=[lat_long_Array objectAtIndex:[parTbl.placemark_Title intValue]];

Try this

다른 팁

Method 'objectAtIndex' must has the argument that is NSInteger.

You can trasform that variable.

 NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]
 NSInteger index = [[numberFormatter numberFromString:parTbl.placemark_Title] intValue]
 DetailTitLbl.text=[lat_long_Array objectAtIndex:index];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top