Xcode 6 Beta 5 Swift Playground: Cannot find symbol for CGRectMake ()

Since upgrading to Xcode 6 beta 5, my playground code will no longer compile / run and register:

Playground execution failed: error: Couldn't lookup symbols: _CGRectMake

      

It should be simple enough and work fine in previous versions. The only code I run up to this point is as follows:

import Foundation
import UIKit
import XCPlayground
import QuartzCore
let frameRect: CGRect = CGRectMake(0, 0, 500, 500)
var customView = UIView(frame: frameRect)

      

Just wondering if anyone has any issues with Playground and found solutions. My guess is just beta.

+3


source to share


2 answers


Try to simply remove "make":

import Foundation
import UIKit
import XCPlayground
import QuartzCore
let frameRect: CGRect = CGRect(0, 0, 500, 500)
var customView = UIView(frame: frameRect)

      



Also, you might get another weird error when importing the XCPlayground, so try this:

customView.setTranslatesAutoresizingMaskIntoConstraints(true)

      

+2


source


Should be used instead let rect = CGRect(x: 0, y: 0, width: 500, height: 500)

.



CGRectMake

still works for me though ... have you created a new playground with beta 5? I have found that it is best to always create a new site for each new beta.

+3


source







All Articles