Giter Site home page Giter Site logo

spstackednav-note's Introduction

SPStackedNav

Joachim Bengtsson [email protected]

SPStackedNavigationController

SPStackedNavigationController is a UINavigationController drop-in replacement, which represents its content in stacks of panes, rather than one at a time. This interface trend was started by Loren Brichter in Tweetie for iPad, and has spread to many apps in many variations since.

There are two main advantages to this approach:

  • You can display two pieces of main content at once, allowing you to navigate in one while using content in the other.
  • Navigation is direct instead of indirect, which is faster and more intuitive to use. You actually grab the UI and pull it to where you want it. In contrast, a standard navigation controller requires you to find and tap a button with an abstract "back" concept.

The main drawback is that you should no longer use horizontal gestures, as they will interfere with navigation, or the other way around.

At Spotify, we use this style for navigation in our iPad app. We are very proud of the outcome, and are contributing it back to the community, in hopes that others will find it as useful as we do. This code has been used for several years at Spotify and should be very stable.

In our implementation, a page can either be "full size" and thus cover the whole width of the parent container (which we use for the root view controllers in our stacks), or half-size (exactly two will fit in landscape, or one and a half in portrait).

SPSideTabController

In addition, SPSideTabController is a drop-in replacement for UITabBarController, but with tabs along the left side rather than along the bottom. This is one of the UIs that are commonly combined with a stacked navigation.

Extra tab bar items can be added along the bottom (e g for "Settings"), and the whole bottom of the screen can have an attachment, which we use to show the currently playing track in Spotify.

Usage Instructions

  1. Pull in "include", "Sources" and "Graphics" into your main project.
  2. Go to your project settings, then Build Settings for your app target, and change "Header Search Paths" to include and "{your path to SPStackedNav}/include".
  3. #import <SPStackedNav/SPStackedNav.h> either from your prefix header, or the source file where you want to use these classes.

See Examples/StackExample for some example usage.

Version History

1.0: Initial release

spstackednav-note's People

Stargazers

xujun wu avatar Liny avatar stevenlfg avatar zhangjingcheng avatar  avatar HF avatar

Watchers

James Cloos avatar junbinchencn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.