我想通過已在第一視圖已經取得像在這裏如何將對象從類傳遞給anthoer? - 從一個班級到另一個班級的意見?
if (self.bookDetailViewController == nil)
{
iPhoneStreamingPlayerViewController *aBookDetail = [[iPhoneStreamingPlayerViewController alloc] initWithNibName:@"iPhoneStreamingPlayerView" bundle:nil];
self.bookDetailViewController = aBookDetail;
NSLog(@"View initilaized");
[aBookDetail release];
}
//call a method from another class like over here
[booksNavController1 nowPlayingView:bookDetailViewController];
//in 2nd view controller
-(void)nowPlayingView:(iPhoneStreamingPlayerViewController *)NPView
{
nowPlayingSong = NPView;
}
-(void)getSng:(NSString *)sng
{
name = sng;
}
//ibacton for toolbar button
-(IBAction)nowPlaying
{
Music_appAppDelegate *delegate = [[UIApplication sharedApplication]delegate];
[delegate.booksNavController pushViewController:nowPlayingSong animated:YES];
}
這裏是什麼nsloged視圖「應用程序嘗試對目標推零視圖控制器。 響應跳板的終止終止。 「
不工作:/ .. – 2011-06-07 05:35:24