This comes up on Stack Overflow often enough that it seems worth a little article here. The issue is this: You set the frame
of a view or layer in code, but it doesn’t seem to come out in the right place. The reason is usually that you’re doing this too soon.