I have a subview that shows once a button is pushed and it shows up fine. I have the subview showing a label along with it. I am just lost on how to change the background color of it and give it some transparency by adjusting it’s alpha and setting the label’s text color to something else. I know this is just like three to four lines of simple code but I’m at a lost now.
Here is my code:
- (IBAction)showInfo:(id)sender
{
UIView *mySubview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
[self.view addSubview:mySubview];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 50)];
label.text = @"This is a label";
[self.view addSubview:label];
}
It all runs fine, I’m just missing some pieces
Try out this code:
Hope this help you.