2012-12-05 14 views
0

當我將下面的代碼放入TabelViewController的「didSelectRowAtIndexPath」時,它會出現異常。我該如何解決這個問題?SHKFacebook shareItem:項目執行異常

SHKItem *item = [SHKItem text:@"I need your fashion advice. I am using my iPhone app iFrockUp to help me decide on stuff for my event. Could you pretty please rate it and give me your stars out of 5? Your vote will help rank it in the app."]; 
item.tags = [NSArray arrayWithObjects:@"iFrockUp", @"share", @"clothes", nil]; 
[SHKFacebook shareItem:item]; 

異常「NSInvalidArgumentException」,原因:「應用程序試圖提出關於目標一個零模態視圖控制器」。 *第一擲調用堆棧: (0x3be1e2a3 0x35d0d97f 0x3503c139 0x2a1d25 0x2a1b8b 0x2bd149 0x23634d 0x2aa207 0x233b95 0x2aa207 0xc4153 0xc572d 0x3501226d 0x35094ea1 0x36c19a6f 0x3bdf35df 0x3bdf3291 0x3bdf1f01 0x3bd64ebd 0x3bd64d49 0x3a1322eb 0x34fa42f9 0xc266b 0xc2610) 的libC++ abi.dylib:終止叫做拋出異常

+0

在TabelViewController的「didSelectRowAtIndexPath方法」,只具有3行以上?,錯誤是很清楚,應用程序試圖以呈現零模態視圖控制器,其中,當我與上述第3行測試,這是不零,工作正常。 – piam

回答

0

其實我只是在RootViewController.m的didSelectRowAtIndexPath中添加這些代碼行,它的項目直接來自sharekit2.0,沒有其他改變。

它是在模擬器OK,但不要對我的iPhone4S

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

{ SHKItem *項目= [SHKItem文本有一個例外:@「我需要你的時尚建議我用我的iPhone應用程序iFrockUp到幫助我爲我的活動決定事情,請給我評分,並給我5星以下的星星?您的投票將有助於在應用中排名。 item.tags = [NSArray arrayWithObjects:@「iFrockUp」,@「share」,@「clothes」,nil]; [SHKFacebook shareItem:item];

}