SBJsonParser를 사용하여 트위터 피드를 가져 오는 튜토리얼을 따라 가려하고 테이블보기로 표시합니다. 내[__NSCFDictionary isEqualToString :] : 인스턴스로 전송 된 인식 할 수없는 선택기 0x6b7e510 '
@interface에
NSString *json_string; NSArray *statusArray;
이 트위터를 얻기 위해 사용하는 코드 메신저 뭐죠
그러나 나는 다음과 같은 오류를 얻고 것은
[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6b7e510
입니다 피드
0 12,351,742,그리고 이것은 무엇 테이블보기에 넣어 사용하는 메신저
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return statusArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell.textLabel.text = [[statusArray objectAtIndex:indexPath.row] objectForKey:@"user"];
return cell;
}
편집 :
내가 objectatindex와 statusArray을 NSLogged : 0 내가
{
contributors = "<null>";
coordinates = "<null>";
"created_at" = "Mon Mar 26 19:43:54 +0000 2012";
favorited = 0;
geo = "<null>";
id = 184365079062528000;
"id_str" = 184365079062528000;
"in_reply_to_screen_name" = "<null>";
"in_reply_to_status_id" = "<null>";
"in_reply_to_status_id_str" = "<null>";
"in_reply_to_user_id" = "<null>";
"in_reply_to_user_id_str" = "<null>";
place = "<null>";
"retweet_count" = 0;
retweeted = 0;
source = "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\U00ae</a>";
text = "Kalau tidur jam segini engga mungkin bisa mimpi-___-";
truncated = 0;
user = {
"contributors_enabled" = 0;
"created_at" = "Tue Apr 27 18:28:24 +0000 2010";
"default_profile" = 0;
"default_profile_image" = 0;
description = "27June!";
"favourites_count" = 0;
"follow_request_sent" = "<null>";
"followers_count" = 733;
following = "<null>";
"friends_count" = 331;
"geo_enabled" = 1;
id = 137772903;
"id_str" = 137772903;
"is_translator" = 0;
lang = en;
"listed_count" = 0;
location = "";
name = "Faisal Maulana \U2606";
notifications = "<null>";
"profile_background_color" = 050505;
"profile_background_image_url" = "http://a0.twimg.com/profile_background_images/451260814/428031_258048570950875_100002372012794_560610_1320195241_n.jpg";
"profile_background_image_url_https" = "https://si0.twimg.com/profile_background_images/451260814/428031_258048570950875_100002372012794_560610_1320195241_n.jpg";
"profile_background_tile" = 1;
"profile_image_url" = "http://a0.twimg.com/profile_images/1962687246/IMG01822-20120319-1126_normal.jpg";
"profile_image_url_https" = "https://si0.twimg.com/profile_images/1962687246/IMG01822-20120319-1126_normal.jpg";
"profile_link_color" = 0a0a0a;
"profile_sidebar_border_color" = 161717;
"profile_sidebar_fill_color" = ffffff;
"profile_text_color" = 050505;
"profile_use_background_image" = 1;
protected = 0;
"screen_name" = IcalHuba;
"show_all_inline_media" = 0;
"statuses_count" = 60850;
"time_zone" = Greenland;
url = "<null>";
"utc_offset" = "-10800";
verified = 0;
};
}
있어
JSON 구문 분석기가 자동 렌더링 된 객체를 반환하기 때문에 statusArray가 범위 끝에서 할당 해제됩니다. - 그것을 유지하십시오. –
그러나 ARC는 보유를 금지합니까? – Huntaz556
statusArray 또는 해당 없음을 가져 오시겠습니까? statusArray의 가치를 보여줄 수 있습니까? –