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

Unable to select BarChartView from storyboard (iOS) #1892

Closed
ghost opened this issue Nov 30, 2016 · 9 comments
Closed

Unable to select BarChartView from storyboard (iOS) #1892

ghost opened this issue Nov 30, 2016 · 9 comments

Comments

@ghost
Copy link

ghost commented Nov 30, 2016

Same problem as #1197 but for iOS.

I want to integrate Charts to my Swift 2.3 project, Xcode 8
Installation using Carthage

And I can't set BarChartView on graph view on StoryBoard.

@pmairoldi
Copy link
Collaborator

You might have to build charts once first for things to show up.

@ghost
Copy link
Author

ghost commented Nov 30, 2016

@petester42

I don't understand your answer as Charts is installed using Carthage.

@paulpilone
Copy link

@petester42 Make sure you also set the Module in Interface Builder (below the "Class" setting) to "Charts".

@pmairoldi
Copy link
Collaborator

What @paulpilone said as well.

@ghost
Copy link
Author

ghost commented Dec 1, 2016

@paulpilone I already tried to set class settings on StoryBoard:

  • I dragged & Dropped a view on Controller
  • I then want to set Class Info on Identity Inspector: whether I use autocompletion or selection BarChartView is not offered as a choice
  • manually adding BarChartView to Class field of Custom Class tab lead to a crash when accessing the view
  • manually adding Charts to Module field of Custom Class tab does not work as Xcode remove it instantly

Currently I create a View on StoryBoard and get its configuration on a BarChartView I programmatically create.

Charts has been installed using classic Carthage command carthage update --platform ios.

@smawpaw
Copy link

smawpaw commented Jan 6, 2017

@Domsware I was having same issue as you. Seems the trick is in Interface Builder set the Class first ("BarChartView") and then set the Module ("Charts"). If you set the module first Xcode will auto delete it as you mentioned. You have to manually type in the Module name but it doesn't delete itself if the Class is already set.

@ghost
Copy link
Author

ghost commented Jan 6, 2017

@Mossby Thank you for you help. If my memory is correct I've tried to do this but without success.

@smawpaw
Copy link

smawpaw commented Jan 9, 2017

@Domsware I just found out you can also just subclass (i.e. MyBarChart: BarChartView { }) and then you don't have to set the module at all.

@liuxuan30
Copy link
Member

I think this can be closed

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

4 participants