-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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 (OS X) #1197
Comments
would StackOverflow experts help on this? |
Are you saying that following the above procedure does not reproduce the result for you? I reproduced this behavior on two machines using the instructions above and the repository source. I do not believe this is user error - but I would gladly take a pointer to a relevant stack overflow post to resolve this. I've not seen this behavior before of Interface Builder failing to see modules from embedded frameworks which otherwise work fine. |
I see the same issue as well.. it also repros in the out of box sample as in the above steps as well as for new views.
Expected - You can set Module to "Charts" and class to "LineChartView" Actual - No code completion on this. When you set the value and press enter the value goes away. There is no way to set the class or module on a newly placed view. Attached screenshot for reference. |
@breathe I am saying we might not be the experts for your issue, so help wanted. |
you can follow this link : https://github.com/thierryH91200/Charts-Mac |
@breathe does @thierryH91200 's advice work for you? |
Hi Thierry -- thanks for the trick! I haven't had a chance to try it out yet but I'll give it a try next week and let you know if it works for me. I'm also gonna take a stab at tweaking the code a bit to explore the theory that there's about the conditional compilation that is confusing in and see if I can find a workaround pattern. Thanks for the help! |
Ran into the exact same problem. The only thing I could do to make it work was open the XIB as source code, and edit it manually to add the class and module for the view. Once it's set, it will stay there and work properly. |
I do have the exact same problem. Unfortunately @thierryH91200 's solution doesn't work for me. |
Here's what you need to do:
Then you can build or reopen your XIB/Storyboard normally through 'Open As' > 'Interface Builder Document', and you will see the custom class & module on your view. |
I just tried this and it works as expected if you set the class of the view to be BarChartView and the module to be Charts. I am using Xcode 8. |
@petester42 This works properly for me in iOS projects, but I still have the issue with a MacOS project running Xcode 9.2. When I attempt to set the view class to BarChartView, it's immediately reverted back to NSView. I'm unable to edit the Module field. However, the method mentioned above of editing the |
I'm not sure entirely what's going on -- but I'm encountering an issue where the views exported from the Charts module are not useable from storyboard files. I can reproduce easily with the ChartsDemo-OSX Xcode project included in the source repo.
Steps to see the issue:
I'm wondering if maybe something about the conditional compilation for UIKit/AppKit is confusing the way that IB discovers NSView subclasses? Can anyone else reproduce the issue or have a workaround?
This is with Xcode 7.3.1 on OS 10.11.5
The text was updated successfully, but these errors were encountered: