当我想在最新的Xcode中使用CGSizeMake时出现错误。它说CGSizeMake不再适用于Swift。如何正确修复此错误?
var V1 : View1 = View1(nibName: "View1", bundle: nil)
var V2 : View2 = View2(nibName: "View2", bundle: nil)
self.addChildViewController(V1)
self.scrollView.addSubview(V1.view)
V1.didMove(toParentViewController: self)
self.addChildViewController(V2)
self.scrollView.addSubview(V2.view)
V1.didMove(toParentViewController: self)
var V2Frame : CGRect = V2.view.frame
V2Frame.origin.x = self.view.frame.width
V2.view.frame = V2Frame
self.scrollView.contentSize = CGSizeMake(self.view.frame.width * 2, self.view.frame.size.height)