What is this mobile navigation pattern called? I need to replicate it but I dont even know how its called.
I need to replicate it in the mobile version of a responsive website. I believe its used in many native apps, its a "carousel" style navigation, where you slide the nav sideways in orther to access the other options.
Mobile subnav
I believe this particular pattern is called Horizontal Overflow. You can find an example of it under Brad Frost's Responsive Navigation Patterns (along with a ton of other great patterns) here:
https://bradfrost.github.io/this-is-responsive/patterns.html#navigation
In Android/Material Design that's a Tab.
https://www.google.com/design/spec/components/tabs.html#
There is no identical native control on iOS, the closest thing is a Segmented Control placed at the top of a view.
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Controls.html#//apple_ref/doc/uid/TP40006556-CH15-SW27
Their usage varies on the two platforms. On Android tabs navigate among a number of views, where on iOS top aligned Segmented Controls often provide a filtering function on a single view.
iOS has Tabs too, but they're properly positioned at the bottom of the screen.
Related
As the picture above demonstrates, I want a layout that could contain A,B,C 3 sections. But only section B would be visible, A & C should be hidden, but when user swipe on section B, they could see the content of section A or C. I know ScrollView could do this, but I don't want it to be scrollable to the user. I want to programmatically control the behaviour when user swipes on it. Similar to the carousel. I have tried normal layout like GridLayout, FlexboxLayout...they all will contain the elements in the page, they just didnt let them overflow. So anyone has any idea on how to work around on it, please let me know, thanks.
I would recommend using nativescript-carousel (https://market.nativescript.org/plugins/nativescript-carousel) to achieve this. I think that is pretty much what you are after - just hide the indicator (dots). There are demos on that page for how to use with vanilla javascript, angular, or vue.
It makes use of DKCarouselView for iOS and ViewPager for Android.
You can also hook onto the slide tap and change events easily enough, which is all in the demo usage instructions.
What I'd like to do is basically use a widget like the one in step 4 here:
This is the utilities panel on the right of Interface Builder / XCode, where you can use various Inspector tools, e.g. 'Attributes Inspector', etc.
Does a widget like that exist in Cocoa/Interface Builder? It looks like it's somewhat based on a NSTableView, but I don't see how I'd do the grouping-based functionality using a standard NSTableView (i.e. the 'Show' button on the top-right, or the horizontal line separators between groups), and I also don't quite see how I would do the headers (which span multiple table-rows). The images on top are probably a mix between (visually) a toolbar and (practically) a tab-bar, but it looks like it's integrated in the whole.
I searched somewhat, did see this post, which refers to a non-existing project. I found copies, but they don't appear to work in latest versions of Interface Builder (I'm using XCode 6.1.1). They also appear to be pane/window-based, which is an older version of Interface Builder.
There is no one built-in control to do that. It's a combination of multiple controls, including custom views. Likewise, there are multiple ways to approach implementing it.
There may very well be a tab view to switch out the various inspectors, but, if so, it's "tabless" and the actual buttons to do the switching are customized. There's just a row of buttons and the controller switches the tab view's tab based on which is pressed. If you pick the right button style, set a template image and no title, and set their states so they act like radio buttons (only one "on" at a time), they should draw properly (the selected one will glow blue).
I think it's conceivable that the sections could be implemented using a view-based outline view. It would be a single column and the cells would be the complex views you're seeing. The section headers would be rows at the root level and the sections would be children of those rows, a level deeper in the hierarchy of the outline. Therefore, hiding and showing the sections would be achieved by collapsing and expanding the section header rows. There's even a special view identifier, NSOutlineViewShowHideButtonKey, that NSOutlineView uses to look up a Show/Hide button view from the NIB (or the delegate).
You can also implement the sections and their headers using a stack view. Apple actually has sample code for that exact thing:
InfoBarStackView.
Is it possible to have like a main menu based on a let's say a DialogViewController, and navigate to a OpenGL-ES based iPhoneOSGameView ?
Yes. You can even add multiple OpenGL ES views as subviews of a standard UIView.
Though you ask about iPhoneOSGameView specifically, I recommend considering GLKView available as of iOS 5. This provides some of the same features as the iPhoneOSGameView as well as some of the generated boilerplate around animation and CADisplayLink. It would also give you the option of creating the view in the Interface Builder, should you desire. Finally, it is provided by Apple to fill a similar role and, arguably, would be more aligned with future development.
I have done the reverse. In fact, MonoGame supports opening iPhoneOSGameView as the main view and displaying standard modal view controllers over top of it. This functionality is in the GamerServices section of XNA.
I think you should create a simple example, print a solid color in the game view and try presenting it over top of a standard controller.
I would think it would work fine.
I am new to Cocoa development and I am trying to create UI layouts using what I consider to be the "standard" layout that is shared by apps like iTunes, iCal, iPhoto, Billings, 1Password, Numbers, Delicious Library, etcetera. This typical layout can be described as follows:
A "Library" panel on the left side of the screen, usually meant for discovering hierarchies. This panel usually covers about a fourth of the horizontal space.
A "Main" panel to the right of the Library panel on which most of the UI interactions take place. This takes the remaining horizontal space and is where we find things like the monthly calendar view in iCal, or the tile of album art and playlists in iTunes.
Some "Utility" panel on the bottom-left corner of the screen, usually for things like additional options.
Is there a documented pattern that will show best practices on how to "wire" the View and Controller classes for these types of layouts? For instances, how many ViewControllers to use, whether or not using an NSDocument-based approach makes sense, some common pitfalls, etcetera? This layout is so prevalent, that I am surprised that there doesn't seem to be any good reference on it.
Update:
I forgot to mention that I have access to the Apple Developer site, and while I can find the library reference for the different classes in Cocoa, I cannot seem to find a good reference for how to bring it all together in the layout I describe.
Books like Aaron Hillegass' and others out there are great to learn the basics on Cocoa and creating simple interfaces (a few controls laid out on an view connected to an NSDocument), but not so great at guiding you to the UI layout I describe.
Thanks.
The hierarchical view on the left is called a Source View and you would normally create this with the NSOutlineView class.
Have a look at Apple's SourceView sample code. It implements a source view very similar to the one in the Finder and elsewhere and should give you a big head start.
The range of applications you mentioned is so wide that it is impossible to give a direct answer.
In general, the item you call a Library is usually an NSOutlineView (for hierarchies) or an NSTableView.
The main panel really depends on the actions contained within, same for the utility panel.
My suggestion is to read Apple's Human Interface Guidelines for OS X. This will give you the best overview of how to do things. Other than that, the actual implementations are too dependent on the individual program.
XCode 4 (but also iTunes and other Mac apps) provide side or bottom bars that can be shown or hidden with a smooth animation as the user presses a button.
How can I obtain a similar effect in my applications?
You can use NSSplitView to do that. You can have more than 2 subviews in a split view (left|center|right) and you can build a kind of hierarchy for the different bars (center consists of top and lower split views).
The show/hide effect is not built in, though. But you should be able to use the animator to do that. Most certainly you can also define animations for hiding a view.
You could also use the BWSplitView of http://brandonwalkin.com/bwtoolkit/ where the show/hide animation is already included.
You could also consider subclassing NSViewAnimation, which I believe Xcode uses in a number of places to achieve its fancy animation effects.