I want it to be a frame with slightly rounded edges which I know how to do, but also I want the top part of it to be shaded gray with the close button on it which I have problems with.
To better visualise it:
You can image labels and then add UICorner as @Lava_shield and @LandnBlu said above, but if you decided to make it using just frames, you should use ZIndex.