【发布时间】:2011-07-17 02:19:50
【问题描述】:
我部分是通过添加一个滚动视图,通过实例化一个继承 uiscrollview 的类(下面称为 ScrollViewManager)来覆盖 touchesEnded。问题是虽然我的班级现在有滚动和触摸功能,但我再也看不到我的视图/笔尖文件了,即使它对触摸和滚动的响应很好。
我的想法是将 MyClass 笔尖添加回子视图?或者不知道...好像它就在那里,但只是隐藏在这个滚动视图后面。
'Myclass : UIViewController' 的摘录在 viewDidLoad 中有这些代码行来获取带有触摸响应的滚动动作。
非常感谢。这么多。
scrollView = [[ScrollViewManager alloc] initWithFrame:self.view.frame];
scrollView.contentSize = CGSizeMake(320, 600);
[scrollView setUserInteractionEnabled:TRUE];
[scrollView setScrollEnabled:TRUE];
self.view = scrollView;
//trying with this line to add my nib for this class on top of the scroll view
//which doesn't work: 'Accessing unknown 'view' class method'
[scrollView addSubview:Myclass.view];
[scrollView release];
【问题讨论】:
标签: iphone xcode sdk uiscrollview xib