Adding paintcode stylekit images to storyboard not showing preview - paintcode

I'm following the instructions for adding stylekit images to storyboards by adding an object, setting it's class to stylekit and then right click dragging to the UIImage from the stylekit object - however I'm not seeing the images show up in UIImageView preview in the storyboard. The image is there when I run the code however.
Is there a different series of steps I need to take? I'm using ios9 xcode 7.

Interface Builder doesn’t allow previewing this kind of connections. To see the image in IB, you will need to subclass the view, mark it as #IBDesignable and override drawRect method, where you call the StyleKit drawing method.

Related

Custom Controls in Xamarin iOS with MVVMCross and no XIB

I am following a code only approach for my Xamarin iOS app and can see how you can easily create control such as UILabel and UITextField in ViewDidLoad of a Controller. That is also where I can apply MVVMCross Fluent Binding.
I have seen Stuart's n19 where he creates a custom Circle View and one that creates a Custom Label.
The custom circle overrides the Draw method and draws a circle (Owner Draw)
The custom labels changes the Forecolor of the existing Label (Subclassed)
I don't feel that either of those works for me. I want to create a UIView that is made up of other controls, a composite control. Imagine a control that looked something like this. That would be an ImageView, and 4 labels with one of them clickable.
At what point in the life of the UIView would I create something like that. Is there an equivalent of ViewDidLoad?
As Stuart said in his comment, N=32 - ViewModels and MvxView on the iPad - N+1 days of MvvmCross
is the MVVMCross tutorial you want.
For those that are happy with the idea of ViewModels being more than just a ViewModel per screen and understand Binding the bit around Custom Views starts at minute 20

how to remove default graphic assigned to a control (like buttons and checkboxes) before setting new graphic to that control in java fx scene builder?

i am making a java desktop application using javafx. For gui building i am using scene builder 2.0.
Everything is just perfect as expected just 1 thing. I want to customize the buttons. i want to assign a custom graphic to a button.
When i use [button.setgraphic(node)] , this statement set the new graphic to the button but default graphic of button also remains present as well.
I just want to remove the default graphic and then want to assign the new (custom) garaphic to a control like buttons and radio buttons in javafx. 1 thing again i must tell that i am using scene builder for building gui.
How can i achieve this ?
thanks in advance....
Below is the screen-shot of current occuring situation, .....
Here i have made a button using javafx scene builder , and then in the controller of the fxml file (.java file) i am trying to set the image (shown in orange box in snapshot) to that button by using setGraphics property of button ..... i just need that button to be of following shape ...
You'd better customize your button via CSS. Here goes tutorial. What you are trying to do is to modify button picture (which is empty by default). I guess this wasn't your exact purpose.
button.setGraphic(null)
// worked for me.

Adding UIWebView to second (not first) Storyboard view controller

Getting started with xCode 4.6.3 and I'm running into a hiccup.
I've built a simple app using the UIWebView to display a local HTML file and it's contents. I used that to debug any issues with the HTML and/or image displays and I'm all set.
Now I need to recreate that within a larger project I've built with storyboards for all my navigations between multiple view controllers. My issue comes when I'm trying to control-click drag from the WebView into the ViewController.h code below the #interface like many tutorials show, and that worked fine within my smaller single view controller app. It won't do it. I know I'm missing something obvious here. Am I going to have the set up these screens (I have multiple ones to do this same way) as separate xib files and add them into my main project?
Thanks for any help and clarification.
-Chris
You can create a class called for example myWebViewController and in Interface builder add a UIWebView to it. The control+drag to the header file will work.
Every time you want a UIViewController that has a browser in it, define its class as myWebViewController in Interface Builder.
Try not to repeat code. If you see UIViewControllers or any other UIView...that do the same thing, you can group them into a class that you use over and over.

Resizing a custom XYChart in an FXML Tab Pane

This question related to Java-FX and its charting capabilities and resizing.
My problem is that I wanted to create a custom candlestick chart and I managed to get that done by going through the Ensemble application source code which was quite helpful.
The code for generating the candlestick is here:
http://javafx-ui-hxzon.googlecode.com/svn-history/r13/trunk/ChartsSampler/chartssampler/CandleStickChart.java
However, when I run my application, I seem to be stuck with a chart size that is fixed and does not resize according to my Tab Pane (the parent) resizing in my GUI. I've gone through the code, fiddled with it, changed the value of the minWidth and minHeight to USE_PREF_WIDTH AND USE_COMPUTE_WIDTH both but I cannot get it to fit to the parent Tab pane.
What am I missing?
I call AdvCandleStickChartSample in my controller as follows:
AdvCandleStickChartSample adv=new AdvCandleStickChartSample();
candleTab.setContent(adv);//candleTab has been predefined in an FXML file
My guess is I need to resize based on an event-handler? Am I correct in assuming this? Or am I not overriding a specific method that handles the resizing? When I create a dummy linechart and fill it with data and "run" it, it resizes fine along with the window.
Please help!
Never mind.
I found the answer. I simply had to override the layoutChildren() method by implementing the Pane superclass.
In the Ensemble application they accomplish this by implementing a "Sample" class which overrides the Pane super-class's layoutChildren() method

iPhone SDK building an Omnigraffle like app

I have been trying to find an example or some hints on how to create an app that I could drag, resize, rotate images onto a UIView and then save the individual pieces (including their size, rotation and placement) and the entire UIView into CoreData. Kind of like the omnigraffle app.
Any tutorials, examples or anything on any piece of the app would be greatly appreciated.
for dragging a view
http://www.cocoacontrols.com/platforms/ios/controls/tkdragview
for roting a view http://www.cocoacontrols.com/platforms/ios/controls/ktonefingerrotationgesturerecognizer
for resizing a view
http://www.cocoacontrols.com/platforms/ios/controls/spuserresizableview
What respects to core data, its actually pretty straightforward just, gather the classes in one view, see the properties you need to save, and the new one you will need for your app and thats it.
Like:
Object Canvas containing a many relationship to morphlingViews wich contain all the properties as center, color, width, height, angle, UIPath (if you plan to create custom shapes) layer position (so it gets drawn correctly) and if you plan to connect the views as omnigraffle add a many realtionship to self (in morphlingViews) so you can take the center of different morphlingViews and add a simple line between them. (and a string if you plan to add drawInRect method to allow users to write in the objects, then it will be a good idea to add the text properties as well).
You can also add Quartz Composer drawing styles properties to the object, as shadow, shadowColor, shadowOffset, or add patterColor to add resizable background.

Resources