2013-08-30 13 views
0

我有一類名爲searchresultviewcontroller另一個customcell類是該類searchresultcell我有一個UIButton當時該按鈕,點擊後轉到其他類時。一個atteched customcell xib圖像0​​無法從自定義單元格導航到另一個視圖在iOS 6中

//爲.h文件中

@class SearchResultViewController; 
@interface searchresultcellCell : UITableViewCell{ 


IBOutlet UIButton *btnReadMore; 
SearchResultViewController *parent; 

}

@property(nonatomic,retain)SearchResultViewController *parent; 
@property(nonatomic,retain)IBOutlet UIButton *btnReadMore; 
-(IBAction)btnMore:(id)sender; 

// .m file 
-(void)btnMore:(id)sender{ 
     NSLog(@"Sucess"); 
AboutViewController *objAbout = [[AboutViewController  alloc]initWithNibName:@"AboutViewController" bundle:Nil ]; 
[parent.navigationController pushViewController:objAbout animated:YES]; 

} 
+1

哪裏是你的代碼的方法是什麼? –

+0

分享一些代碼。 – Suryakant

+0

@ BhavikKama,Suryakant Sharma我編輯了我的問題 – Prashant09

回答

1

它不會被parentiew控制器選項可以解決

在兩個選項,您可以使用

  1. 您可以在視圖控制器類添加通知和調用 通知,自定義單元格類
  2. 使用協議,委託
+0

問題使用通知thanx兄解決;) – Prashant09

相關問題