Hier _danView ist KnöpfenUIWebView addSubView UIButton auf die Schaltfläche klicken Ereignis nicht reagiert
und Selbst ist UIWebView
_danView.frame = CGRectMake(windowWidth +randWindth, gaodu+[heiArr[i]intValue], size.width+40+(size.height+8)/2, size.height+8);
_danView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"danmaku_bg"]];
_danView.userInteractionEnabled = YES;
self.userInteractionEnabled = YES;
[_danView addTarget:self action:@selector(tapClick) forControlEvents:UIControlEventTouchUpInside];
_danView.layer.cornerRadius = (size.height+8)/2;
_danView.layer.masksToBounds = YES;
[self addSubview:_danView];
// [_danView addSubview:label];
[self animationWithView:_danView];
-(void)tapClick{
NSLog(@"click click");
}
danken! Aber der Knopf nicht mit XIB –
erstellt, die noch kein Thema ist können Sie es tun .. –