I am creating a button programmatically for an iPad application. when I see the button, there is a shadow thing under it. what is it and how can i get rid of it?

here is the code that creates it:
UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; myButton.titleLabel.font = [UIFont fontWithName:@"Trebuchet MS" size:12]; [myButton setTitle:@"test" forState:UIControlStateNormal]; myButton.frame = CGRectMake(0, 0, self.leftScrollView.frame.size.width, 50); UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"gear12.png"]]; [myButton addSubview:myImageView]; [self.leftScrollView addSubview:myButton];
UPDATE:
ok, I notice that I only get this effect in my scroll. if I add it to the view, no shadow effect.
top test button, the button is a sub-view. the bottom button is the scrollview sub-item, which is the view subview (button / view vs button / scrollview / view).
the white section is the view, the gray is the scrollview / view.

UPDATE 2:
as pointed out by robmayor, UIButtons always have this double line effect, just donβt notice when the background color is white. blue is the view and gray is the subview scroll view.

source share