【发布时间】:2010-06-08 02:47:27
【问题描述】:
在我的幻灯片 nib 文件中未检测到我的 UItouches。问题是什么?有人可以帮忙吗?
@class Slideshow;
@interface RootViewController : UIViewController{
PreferencesController *preferencesController;
Slideshow *slideshow;}
幻灯片实现
@implementation Slideshow
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
NSLog(@"touches begin");
}
- (void)viewDidLoad
{
UIImageView *frontView = [[UIImageView alloc] initWithFrame:self.view.bounds];
frontView.backgroundColor = [UIColor blackColor];
frontView.image = [UIImage imageNamed:@"apple.png"];
frontView.userInteractionEnabled = YES;
[self.view addSubview:frontView];
[frontView release];
}@end
【问题讨论】:
-
幻灯片是什么类型的课程?它是否继承自 UIResponder?