I tried adding a view with a white color like transparent so I set this:
self.backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0.0f,0.0f,1024.0f,768.0f)];
[self.backgroundView setBackgroundColor:[UIColor whiteColor]];
[self.backgroundView setAlpha:0.5];
[self.backgroundView setOpaque:NO];
[self.view addSubview:self.backgroundView];
slotButton.frame = CGRectMake(550, 350, 400, 100);
[backgroundView addSubview:slotButton];
}
But when I add a button in my view the button became transparent. What I wanted is to add a button to a white transparent view without making the UIButton transparent too.
In stead of making your View transparent, only set its background color to transparent
Like this: