The actual error here is obviously that `d` is a Double but `self.view.frame.size` is a CGFloat. However, the error message reads:
Value of type '(CGRect) -> CGRect' has no member 'size'
That is quite a fascinating diagnostic. Notice that this is not saying that CGRect has no `size`. It is talking about a function that takes a CGRect and returns a CGRect. I cannot imagine what function it has in mind!