Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undeclared type 'CGFloat' #44

Closed
msanders opened this issue Apr 23, 2015 · 9 comments
Closed

Use of undeclared type 'CGFloat' #44

msanders opened this issue Apr 23, 2015 · 9 comments

Comments

@msanders
Copy link
Contributor

Has anyone had any luck getting this to compile for an iOS 7 project? I tried the suggested approach (copying all .swift files to your project), but I'm getting lots of compiler errors from what look to be missing UIKit imports:

ios-charts/Charts/Classes/Data/ScatterChartData.swift:19:43: Use of undeclared type 'CGFloat'; did you mean to use 'CGFloat'?
ios-charts/Charts/Classes/Data/ScatterChartData.swift:21:19: Use of unresolved identifier 'CGFloat'
ios-charts/Charts/Classes/Data/BarChartData.swift:18:31: Use of unresolved identifier 'CGFloat'
ios-charts/Charts/Classes/Data/BarChartData.swift:21:28: Use of undeclared type 'CGFloat'; did you mean to use 'CGFloat'?

Any idea what's going wrong? I'm using Xcode 6.3.1.

@danielgindi
Copy link
Collaborator

danielgindi commented Apr 23, 2015 via email

@vishw3
Copy link

vishw3 commented Apr 23, 2015

Import UIKit will work i tried it few days back

@danielgindi
Copy link
Collaborator

In do not experience that- so if one of you wants to make a pull request
for iOS 7 compilations with the proper UIKit imports that would be great!

‏בתאריך יום חמישי, 23 באפריל 2015, Vishwas NG [email protected]
כתב:

Import UIKit will work i tried it few days back


Reply to this email directly or view it on GitHub
#44 (comment)
.

@vishw3
Copy link

vishw3 commented Apr 23, 2015

ya i wanted to support for iOS 7 so i just copied swift file in to my project and worked around every thing works fine if UIKit is imported to all shift headers

@vishw3
Copy link

vishw3 commented Apr 23, 2015

hi i have created example project to run on iOS 7 tested on simulator and working fine look into it
https://github.com/vishw3/IOSChart-IOS-7.0-Support/tree/master

@danielgindi
Copy link
Collaborator

Merged :-)

@zhijunsheng
Copy link

I cloned yesterday. Don't understand why I had to manually add "import UIKit" for swift files dragged in. I'm using Xcode 7.3.1 and my own project is an ObjC one. What did I miss?

@kaleevans
Copy link

I've had the same issue as zhijunsheng. Objective-c project still having this issue.

I am trying the importing swift files method as I had issues just importing the framework with the bridging header.

@balkarov
Copy link

I have this problem too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants