iPad slidable right hand side - xcode

How did they do it? Look at these images:
As you can see you can slide the right panel to the left and back. Is that UISplitViewController?

That's definitely a custom view/controller. The stock split view is what it is. Although I think Matt Gammell cooked up a replacement split view that let's you drag the split around, it only changes the proportional size or visibility of your two views. It would take some additional customization to give it this kind of look and feel. I don't have the URL handy though, I'm sorry.

I don't know if you still need this, but you can check this open source class called IIViewDeckController available in github - it's exactly what you need. You can set a right and a left view, add shadows, customize tap or slide interactivity.
It contains a example project so you can understand how to program all properties.

Related

Eclipse-RCP: View pulldown-menu

I would like to add Command's to a View's pulldown-menu (the triangle-shaped button in the upper right corner that the "Problems"-View in Eclipse also has).
Can anyone point me in the right direction how to do this declaratively in plugin.xml?
I found a tutorial that used a viewContribution (extension point org.eclipse.ui.viewActions), but unfortunately using this extension point i can only add Action's to this menu.
The functionality i wish is actually quite similar to the Problems-View (Showing Compiler-Errors and -Warnings in Eclipse):
I want to filter records within my View according to an Entry chosen in the pulldown-menu of the View.
For an example configuration you can use the implementation of the Problem View itself. It uses the org.eclipse.ui.menus extension point to contribute that menuItem through a dynamic contributor. You can check the details in the plugin.xml of the org.eclipse.ui.ide plugin. Look for the usage of the class org.eclipse.ui.internal.views.markers.FiltersContribution. In its "getContributionItems()" method it returns menu contributions dynamically each time the menu is to appear. Of course, doing it this way is not exactly declarative. For that try reading the guide at http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/workbench_cmd_menus.htm (you should use your command instead of the global ones, of course)
Hope it helps!

Drop down window to edit Cocoa pop-up menu items

I'm relatively new to Cocoa and I would like to implement the ability to add or delete items from a pop-up menu in the same way that the OS X System Preferences/Network Location pop-up works. Selecting the 'Edit Locations...' option rolls down a window that provides the ability to add to, or delete from the existing Location list. My interest in doing things this way is as much about conforming to the relevant Human Interface Guidelines as having a way to dynamically change the menu content. (I have no real problem with the 'background' coding side of things, it's the user interface that's my primary issue at this stage.)
Is this a standard IB View?
On the surface, I can't see anything appropriate, but maybe that's just my inexperience. I'm assuming that, because this is not an uncommon sort of requirement, the task should be pretty straightforward and that Apple, or someone, would even have a relevant code sample to show how to define such a window.
Can anyone point me in the right direction?
Sorry for the late answer. I found this tutorial: http://cocoadevcentral.com/articles/000014.php

NSCollectionView with sections - like in iPhoto

I'd like to build a NSCollectionView similar to the one in iPhoto '11. I want to group several pictures in section, and create a section header as well. The section header of a specific section is always visible until the last element of that section is visible. You can take a look at the picture to see what I mean.
EDIT: I should add that the contents are not images.
Thanks in advance
You're probably going to have to look at using CALayers directly. NSCollectionView gets most of its magic from CoreAnimation IIRC, and it looks like you might have to duplicate some of that. Alternatively you could try using nested collection views— one containing groups, then each group contains another collection view of individual items.
Either way, your view/layer hierarchy is going to be the same. You'll have a top-level container which has only one column (since groups stretch across the entire width), then each item within that will have any number of columns, based on the item width. i.e. your 'group' collection view items will stretch to fill width, but your individual items within those groups won't.
If you choose to use the raw CALayer approach, then you'll want to look at CAConstraintLayoutManager. This is what provides the magic inside NSCollectionView. A good place to start looking for information on this is Bill Dudney's CoreAnimation book from Pragmatic Programmers. Bill's now the official platform evangelist for Apple, so I think it's safe to say he knows what he's talking about in there.
Overall, I'd suggest using a nested NSCollectionView approach to start with, and look at dropping down to raw CoreAnimation only if performance seems to be lacking, or if you have issues getting some stuff to work. Using NSCollectionView lets you keep all your current NSView-ness in place, so it will be less work. If it turns out ok, then you're home & dry. If not, you've got something else to try which you can tweak to your heart's content.
Here is a similar sample:
Check this: https://developer.apple.com/library/mac/samplecode/TableViewPlayground/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010727

Visual Studio - Splitting so that Design mode is on top

VS2008 seems to have a new feature that allows one to split a website into the source code and design aspects on the same page. This feature seems great, however it defaults to having the design part on the bottom half of the screen and the code part on the top half.
Unfortunately, my brain doesn't work this way and it ends up being more of a hassle than to just continue switching back and forth when needed like I've done in the past.
Is there a way to swap them so that the design part is on the top and the code part on the bottom? Most other tools in VS are drag and droppable, so I can't see why not, but I'm not finding the setting anywhere. I did a quick google search and found a way to make the split vertical, but thats not what I'm looking for. I'm just looking for the same horizontal split with the design part on top.
Thanks
Here's an alternative approach that may help. If it's a traditional .aspx page (one that has a codebehind), you can open both documents simultaneously. Then right click one in the tab area at the top and select New Horizontal Tab Group. You can manipulate it so that the design window is on top of the code window.
I would be very surprised if this possible, since I have never seen a window configuration that changes the vertical alignment of the Objects and Events drop-down-lists.
I could be wrong, though.
It does seem rather strange - in the xaml designer you can split the screen whichever way you want as there is a button to switch the position of the panes. The options for the html designer only seem to allow a vertical or horizontal split though, there isn't anything in there specifying whether to have code or design at the top, it does seem a little backwards as I imagine most people find it more natural to have the visual designer at the top with the code below.

Is there a simple way to combine a text and icon in an NSCell in Cocoa?

I'm trying to create a very simple selection list widget based on NSOutlineView. However, I'm having a hard time figuring out how to display an icon and a label right next to it, which is really the expected behavior in all the mainstream implementations of that kind of widget out there (iTunes, mail, Finder,...).
So far I am just binding two separate cells, but then when I'm expanding the tree, the icon cell grows larger and a gap appears between the icon and its accompanying label. I know I can probably overcome this problem by extending NSCell and provide a custom class, but as what I'm trying to achieve is really the standard thing, I can't be resigned to accept that there isn't a simpler solution.
Candide
Sadly, there isn't a 'text and icon' cell that you can just use, fresh out of the box as you would like. However, when I was working on a project, I found that Apple released some sample code that implements this, since it is such a common idiom.
This can be found here, specifically ImageAndTextCell.h/m
It can help teach you about UI customization by reading through this example, but scratching that, just dropping the ImageAndTextCell straight into your project should do just fine.
You need to create ImageAndTextcell to combine text and icon..
you can create ImageAndTextcell like this Sample Project

Resources