Custom control within framework not configurable or visible in Xcode - swift

I have created a small selection of custom controls that are tagged #IBDesignable to enable visual configuration within IB. They work perfectly in their parent project/workspace and, as I wanted them to be reusable, I've created a framework.
After importing the framework into another project, I can access the classes programmatically but there is no visual representation in IB and none of the #IBInspectable properties are displayed in the attributes inspector. There are no errors reported during build or run phases. I guess I'm missing something somewhere but does anyone have any pointers?

It would appear that this is not currently possible (using Carthage as a dependency manager at any rate) without considerable effort with workarounds. This kind of defeats the object IMO!
For now it seems that you need to import the framework project into the product project. Explanation here but, for now, this seems dead in the water.

Related

Issue setting data for Radar Chart in iOS charts

I am using the charting library here https://github.com/danielgindi/Charts/ however I am having a couple of issues.
First, I have no idea how to set the data for a radar chart type and second, I have an error when apply the RadarChart to uiview. The error is
Unknown class RadarChartView in Interface Builder file.
The app still runs and I can see an empty uiview.
I have looked at the demo app and through the documentation but I am still unsure how to actually set any data to the chart.
Thanks
If you looked at ChartsDemo app, why you still not unsure how to use it? The code is straightforward. Otherwise I am still copy pasting code from ChartsDemo, which is meaningless.
For the class, you need to choose Charts module for your IB: https://github.com/danielgindi/Charts/issues/59
downloaded library
reembedded it with the option "Embedded Content Contains Swift Code"
In Storyboard where I defined the class for the charts view as "LineChartView", I also have to set the module manually to "Charts".

Extending the Eclipse PropertiesView with further tabs for existing PropertySources

After a quite long struggle with the known and unfortunately one of the few help articles about controlling properties, tabbed properties etc. (links below), I have decided to ask for your help.
What I need to do seems not that hard, but, well, I just couldn't bring the pieces together. So the problem is:
I want to extend the existing properties view of Eclipse (PropertySheet) with some further tabs, which will be later on filled with certain information from EMF objects, which in the end implement IAdaptable. So they can be queried for PropertySources and there are already a few tabs, sections extended in the corresponding project in its manifest, which are being successfully gathered from the Selection Listener of the PropertiesView.
Here comes the tricky part: I don't need to extend this project further, by defining further tabbed properties in its manifest. I need to implement a seperate plug-in project, which does this extension job for the other main project. I don't need extra views or so. This existing project provides the property sources and like sad has its own designed tabbed property view via its extensions.
I have actually become quite familiar with the concept of the views and properties, I can build some Property Sources and let the Properties View gather/show/manipulate the properties.
But this idea, letting an external plug-in extend the Properties View with tabs of an another EMF-based plug-in project, just can't get to me. I am really confused and don't know with what to begin with.
I would be unbelievably glad, if you could point me to the right direction.
Thanks a lot!
*Links:
http://www.eclipse.org/articles/Article-Properties-View/properties-view.html
http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html

XCode wont let me use a Static Library View in my xib files

I created a new project of type Static Linked Library.
I have moved the code (previously working in the app) to the library leaving all the xib files in the app.
I have changed the export directory and added the library file from the derived data folder so it gets the compiled version and links to it.
I have added the library to the bundle and have verified it is in the app using iPhone Explorer
I have verified that the xib file recognized the new view type by removing and selecting the custom view type in the custom class field of the identity inspector.
I have changed all of the #import commands to reflect the <> VS "" change and have gotten the app to compile.
however none of the methods of my custom class can be executed. and an NSLog reports that the class is its base counterpart as opposed to the custom derived class.
I am at a loss and have spend a long time converting all the code I have to work in a library. I am hoping someone can help with this.
On this issue, it turns out that Objective C's compiler does not load the categories and custom classes in the libraries by default. There are 2 ways to overcome this.
And here are your options.
Create an Activation type method on the category that will be called to "Activate" that Class or Category. This will need to be done before the application loads any nib files. And seems like a bit of a pain in the butt. This was however how I originally overcame this issue.
Add linker flags that will tell objective C to load all libraries and attach any and all Categories and Classes within the libraries before executing the application. (this will need to be done, on top of #import(ing) the correct files from their correct locations. I will provide a graphic below. and provide the flags for search purposes
-ObjC is the first one I added, but -all_load really did the trick.
I hope that others can benefit from this experience.

How to create an Interface Builder plugin in XCode5+?

I need make an Object Library, an Interface Builder plugin like Mapkit so that user can drag my Custom Object and add to UIView.
As property, i want to show and configure it with my basic properties.
Any idea how to do this?
thanks.
In Xcode 4.0, Apple has removed support for using custom Interface Builder palettes provided by IBPlugins in the Interface Builder editor. Xibs/Nibs that use such plugins will still compile but they cannot be edited. You'll need to install Xcode 3 (in a separate folder so as not to overwrite 4) and use it to edit xibs with custom palettes.
This is all in Xcode 4's release notes. Stay tuned to prerelease release notes for more updates on this matter.
Update for Xcode 6
Plugins are no longer necessary. See #IBDesignable and #IBInspectable. :-)
You need to create an Interface Builder plugin for that; the static library has nothing Interface Builder knows how to work with.

XCode class models: how to view Framework classes?

I'm using XCode 3.1.4, I'd like to browse the iOS framework classes visually, eg. the UIKit.framework classes.
I believe this is possible with Class Model facility, the documents here http://developer.apple.com/tools/xcode/xcodefuture.html suggest so:
The Xcode class modeler works with Objective-C, C++, and Java source code files and can give you a look at just a few classes, every class in your project, or even all of the classes in a framework.
I made a Class Model and selected Add All to include everything including the framework's .framework files. However on the generated diagram where I see UITableViewCell, it has no arrows pointing up from it, even though I know this class inherits from UIView. I've played with clicking various ways, the menus and Info but can't see how to see the full inheritance tree of UITableViewCell.
Can anyone advise?
This is what I did to make it work:
Select the project:
Then choose Quick Model:
Then you get a ridiculously large model with all the classes in it.
If you wanted the classes from just one framework, you could select just that framework in the files list, instead of the whole project.
I see the same thing in the Xcode Class Modeler, so it may be an issue with the tool or a choice made by its authors.
The method you used should give you a correct model, however you may need to move classes around to be able to see the arrows as there are way too many lines present if you model everything at once. The quick model will give the same results using the selection (i.e. if you select your project itself you get everything, and if you select a group of classes you will just get them.