Swift之Xcode8的'CGRectMake' is unavailable in Swift
2017-06-07 21:23
113 查看
Swift之Xcode8的'CGRectMake' is unavailable in Swift
最近学习Swift的语法,在Xcode8上写代码,报错如下:
查阅相关资料和查看源码,初始化的方法有点小改动之前是CGRectMake现在改成CGRect了,有点小郁闷
正确写法:
let view : UIView =
UIView(frame:CGRect(x:100,y:100,width:50,height:50))
PS:希望可以帮到大家。。。
最近学习Swift的语法,在Xcode8上写代码,报错如下:
查阅相关资料和查看源码,初始化的方法有点小改动之前是CGRectMake现在改成CGRect了,有点小郁闷
正确写法:
let view : UIView =
UIView(frame:CGRect(x:100,y:100,width:50,height:50))
PS:希望可以帮到大家。。。
相关文章推荐
- Swift3-CGRectMake在Xcode8上'CGRectMake' is unavailable in Swift
- The use of Swift 3 @objc inference in Swift 4 mode is deprecated
- Swift - whose view is not in the window hierarchy 问题解决方法
- 关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法 .
- objc[322] Class _NSSwiftEnumeratorBase is implemented in both- 问题解决办法
- Swift - whose view is not in the window hierarchy 问题解决方法
- swift一次 Attempt to present on whose view is not in the window hierarchy的解决方法
- object_setInstanceVariable is unavailable: not available in automatic reference counting mode
- IOS swift使用webView加载网页上传文件报错:whose view is not in the window hierarchy!
- swift一次 Attempt to present on whose view is not in the window hierarchy的解决方法
- xcode 中遇到“release is unavailable in automatic reference counting mode”的解决方法
- Segment in recyclebin? Is it free?
- json-lib-2.4-jdk15.jar 报错 net.sf.json.JSONException: There is a cycle in the hierarchy!错误解决方案(Hibernate)
- 解决 PHP Interpreter is not configured Please configure PHP Interpreter to use built-in web server
- operation category read is not supported in state standby
- Spring Quartz提示:This scheduler instance is still active but was recovered by another in the cluster
- jetty访问jsp页面出现( PWC6345: There is an error in invoking
- Android Studio正式版签名的时候出现:Android xxx is not translated in zh
- eclipse提示:Eclipse is running in a JRE, but a JDK is required
- Where is the best place to put <script> tags in HTML markup?