在用户点击屏幕时,应该有一个带按钮的弹出窗出现。但是弹出窗出现,按钮没出现。不知道哪出错了。是在subView中的subView。
-(void) popUpWithX:(int)x andY:(int)y {
CGRect popUpRect = CGRectMake(x, y, 125, 75);
popUp = [[UIView alloc] initWithFrame:popUpRect];
popUp.backgroundColor = [UIColor whiteColor];
popUp.layer.cornerRadius = 7.5f;
popUp.layer.masksToBounds = YES;
[self.view addSubview:popUp];
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
[button setTitle:@"Click me!" forState:UIControlStateNormal];
[popUp addSubview:button];
}