我在按鈕上呈現一個模式視圖。關閉在iphone SDK中選擇的彈出行上的模式視圖
在該圖中,我提出了一個新視圖(額外視圖)。在額外視圖中,我有一個UITableView
& a UIButton
。
當我點擊那個按鈕,我打開一個視圖(左視圖)popOVer.Now,我想解僱「Extraview」點擊leftView的表格行。
MY代碼如下:
// Leftside view:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"DismissModal"object:nil];
}
// Presented modal view.m
- (void)viewDidLoad
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dismissModal:) name:@"DismissModal" object:nil];
}
-(void)dismissModal:(NSNotification *)notif
{
[self dismissViewControllerAnimated:YES completion:nil];
}
我的錯誤是如下:
[Reader_View dismissModal]:無法識別的選擇發送到實例0xb494e10 2013年1月8日16:12:00.468 AFFeedsReader [3449:1d903] *由於未捕獲的異常'NSInvalidArgumentException'而終止應用程序,原因:' - [Reader_View dismissModal]:無法識別的選擇器發送到實例0xb494e10
發佈一些代碼:) – Rushabh
你可以發表你的代碼? – Dinesh
@Dinesh,我發佈我的代碼.. – user1673099