This morning I came back to my Xcode 5.1.1 project after a few days away. I switched to the (already open) Interface Builder window. Just as I was clicking on the object I wanted to change, I happened to notice in the lower right that the Objects Library showed a list of items I hadn't seen before. I was already clicking the mouse button, and in the brief moment before the click took effect, I noticed objects for disclosure buttons, beveled buttons, and a few other button shapes that aren't normally there.
Of course, then the mouse click took effect, selected the object I was intending to edit, and the objects library changed back to the usual array of views, labels, buttons, etc. I didn't manage to see what was actually selected prior to clicking the mouse.
I've been searching for the objects library, but haven't found anything that explains the list of items I was looking at. I assume it must be options specific to some element in my UI, but I've tried clicking through all my elements, including a table, but can't find that same list of objects.
What am I missing out on?
The objects you were seeing belong to the MacOSX development set - it seems that InterfaceBuilder loads them first and waits until later to load iOS ones if required.
Related
I have an NSToolbar with NSToolbarItem instances. One of the toolbar buttons is in one of two modes, depending on whether it currently operating (has been clicked) or not. I am handling this in code by changing the icon for the button to have a background rectangle when the command it represents is operational, but I can't help thinking there must be another way.
I've tried using the Selectable checkbox in XCode Interface Builder attribute inspector, and it sort of gives the result I want, except when it is selected I can't click any of the other toolbar items. I also can't see how to deselect it.
I'm a bit of a Cocoa noob so I expect the two state toggle thing is just waiting for me to find it, except so far I haven't been able to.
This seems like it would be a common thing to want to do, thing is how?
I have some UIviews with several Pickers. These pickers is shown when needed. I would like to hide them in Storyboard so I can work with the underlying view without having to move them around each time. Possible?
Mark the view as not installed
The compiler will throw warnings but thats helpful in this case.
A cool shortcut is to CMD-CTRL-SHIFT click the element which will give you a selectable list of the hierarchy at that point
I am trying to create a Today Widget in Swift with XCode. I started with the available example code of XCode, when you create a new Today Widget target. The content of my Today widget is loaded from an external source, and whenever a new item appears in the external source it is added to the widget on refresh (widgetPerformUpdateWithCompletionHandler).
The only thing that bugs me is that new items automatically slide in from the top, overlapping all previous items and finally reaching the final destination at the bottom of the list. How can I change this behavior to either slide in from the bottom or not at all and just appear without sliding. I think I know how I could do my own animation with ...view.animator()... but the original functionality is nowhere to be found in my code and I can't figure out how to disable it.
By now I'm pretty sure where it comes from. I assume the list items NSView is initiated with NSViewControllerTransitionOptions and the SlideDown option activated. So the animation comes from the views NSViewControllerPresentationAnimator. Unfortunately presentViewController is not called by myself. This probably is somewhere in the internals of NCWidgetListViewDelegate, which has no option to prevent or change the animation. So I guess, the only way how to "fix" this is to drop NCWidgetListViewDelegate completely and start from scratch. So the answer would be: It's not possible.
I'm using Xcode for the first time. I've been following a tutorial, and I'm completely stumped by something that's surely trivial. I've dragged a "Menu" from the Library into my "MainMenu.xib" window. Double-clicking this menu makes it appear.
No trouble thus far. Editing the three items is intuitive, as is deleting items. How on earth do I add an item to this menu, though?
You want to drag an NSMenuItem from the library palette onto the menu:
You can add submenus and separators similarly.
Cmd-D duplicates anything as well if you are getting tired of the drag-drop thing.
You just have to watch out that as your tags and action connections are getting duplicated too they might not be connected to the thing you wanted them to be.
I am trying to give a ListBox drag and drop ordering functionality and I have hit a wall. I got it to work when I specify the list box items in xaml but it does not work when I bind to a list it no longer works because the items are no longer of a listboxitem type.
I found this code http://blog.dobaginski.com/josh/?p=52 that allows me to get the underlying ListBoxItem but I can't get the mouse move event to fire.
I have went through other tutorials but have not been able to find one that deals with a ListBox. Has anyone done this with a ListBox.
The events I am using are SelectedChange, MouseMove, and LeftMouseButtonUp (I think that name is right). I am not using LeftMouseButtonDown because I couldn't get it to fire.
As far as i know you cannot get at the listbox item container when using data binding. YOu could in Beta 1.
You also cannot set a mouse event handler in the style, you must use a data template, just so you know.
You will likely have to use the mouse move event from a parent element, probably the UserControl or main layout control that hosts the listbox.
State changes and animations need to be in the style though so... you still cant get at the listbox item, just the element inside it in the data template.
Oh and if doing drag and drop HitTest is now protected so that will make the Drop harder.
since today you can download the final 2.0 version of Silverlight with some add ons, check the Scott's web log
I've been trying to do the same thing in WPF,
but have only found many buggy implementations.
One person has guided me towards the blog of Beatriz Costa,
and from what I remember she's one of those rare geniouses,
so I suggest you read that as well... I know I will
Blog of Beatriz Costa