2011-05-12 45 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