2011-05-12 26 views
0

我有一個包含scrollview及其工作正常的視圖(objViewComments)。但現在我使用下面的代碼在UIActionsheet中添加了這個視圖:UIactionsheet中的UIScrollview不起作用

myActionSheet = [[UIActionSheet alloc] initWithTitle:@"n \n \n \n \n \n \n \n" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; 
     myActionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent; 
     objViewComments.view.frame = CGRectMake(0, 0, 320, 480); 
     objViewComments.myTempActionSheet = myActionSheet; 
     //myActionSheet.frame = CGRectMake(0, 0, 320, 480); 
     [myActionSheet showInView:self.navigationController.view]; 
     [myActionSheet addSubview:objViewComments.view]; 
     [myActionSheet release] 

但是現在滾動視圖不起作用。並拋出錯誤:

[UIImageView scrollViewDidScroll:]: unrecognized selector sent to instance 0x18f480' 

感謝

回答

0

基於錯誤,很可能是你的滾動視圖的委託被錯誤接線。

+0

我檢查了它,並且它的右邊連接了bcoz,如果我直接添加視圖而沒有動作表,那麼它工作正常...... :) – 2011-05-18 12:28:14

+0

它只是一個'UIImageView'對象似乎獲取委託消息。那麼哪個對象充當滾動視圖的委託? – 2011-05-18 12:34:30

相關問題