"duration"키와 연관된 값을 UILabel
에 넣으려고 시도하지만 UILabel
에 공백 또는 "(null)"결과가 나타납니다. 그 키NSDictionary 키에서 NSString을 UILabel로 가져 오는 중 문제가 발생했습니다.
내 NSDictionary
목적은 같은, 내가 원하는 생각하는 데이터 및 키의 전체로서 로그인 할 것으로 보인다 :이 RecordingsStats의
내용은 다음과 같습니다
{
"12:48:25 AM, April 25" = {
FILEPATH = "/Users/brian/Library/Application Support/iPhone Simulator/3.1.3/Applications/97256A91-FC47-4353-AD01-15CD494060DD/Documents/12:48:25 AM, April 25.aif";
duration = "00:04";
applesCountString = 0;
을 .. .등등.
cell.durationLabel.text = [NSString stringWithFormat:@"%@",[thisRecordingsStats objectForKey:@"duration"]];
내가도 해봤 이러한 다른 순열 :
여기에 내가 UILabel
에 NSString
를 넣어 노력하고있어 코드의
cell.durationLabel.text = [thisRecordingsStats objectForKey:@"duration"];
내가 ' 또한 태그 기반 접근 방식을 시도했습니다.
label = (UILabel *)[cell viewWithTag:8];
label.text = [[thisRecordingsStats objectForKey:@"duration"] objectAtIndex:1];
과 : 나는 또한 키의 쌍 값에서 문자열을 만드는 시도를 참조했습니다
UILabel *label;
label = (UILabel *)[cell viewWithTag:8];
label.text = [NSString stringWithFormat:@"%@",[[thisRecordingsStats objectForKey:@"duration"] objectAtIndex:1]];
는 "(널)"값이나 공백은 너무 사용.
무엇이 누락 되었습니까? 문자열의 형식을 지정하는 것으로 가정합니다. 보고 주셔서 감사합니다!
텍스트를 설정하는 경우 라인에 중단 점을 설정합니다. 콘솔의 gdb 프롬프트에서 po [thisRecordingsStats objectForKey : @ "duration"]을 입력하십시오. 너 뭐가 보이니? – cduhn
내가 입력하는 경우 : 포 [thisRecordingsStats objectForKey을 : @ "기간"] 또는 아래에 제안 된 답을하려고 할 때 : 포 [통계 objectForKey : @ "시간"] 내가 볼 : 0x0 주소 – Brian
실제로 메모리를 액세스 할 수 없습니다 지금 나는 거기에 나의 끈을 본다. 고맙습니다. 아래 답변은 잘린 파일 이름 날짜 키 인 동적 키를 집어 넣으려고합니다. – Brian