GithubHelp home page GithubHelp logo

weareyeah / waysourcelistwindow Goto Github PK

View Code? Open in Web Editor NEW
174.0 14.0 15.0 2.39 MB

The WAYSourceListWindow is a NSWindow subclass, which splits the window space vertically into the master view on the left, and the detail view on the right side as known from apps like Reminders or Notes.

License: Other

Objective-C 100.00%

waysourcelistwindow's Introduction

WAYSourceListWindow

The WAYSourceListWindow is a NSWindow subclass, which splits the window space vertically into the master view on the left, and the detail view on the right side as known from apps like Reminders or Notes.

The window uses a NSSplitView for the splitting. You should add subviews to instances of this class by setting the masterView and detailView, e.g., via the IBOutlets in Interface Builder. These views will then be added as subviews internally to the masterViewWrapper or detailViewWrapper.

By default, the Master View uses a Vibrant Light appearance. You can change this as you desire.

Whenever it makes sense, the properties of your WAYSourceListWindow instance in Interface Builder are inspectable.

Example

WAYSourceListWindow

Usage

  1. Drag a new NSWindow instance to your XIB
  2. Set the class of the instance to WAYSourceListWindow
  3. Customize the properties via Interface Builder or programmatically
  4. Create two new NSView instances in Interface Builder
  5. Right-click-drag from your WAYSourceListWindow instance to one of the views and define it as the Master View.
  6. Right-click-drag from your WAYSourceListWindow instance to one of the views and define it as the Detail View.

Explanation

Interesting

We are new, weAreYeah.com. Follow us on @weAreYeah for upcoming goodies.

License

Licensed under the BSD License http://www.opensource.org/licenses/bsd-license THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

waysourcelistwindow's People

Contributors

jsakuda avatar raffael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waysourcelistwindow's Issues

Double tap window title maximize issue

When maximizing by double tapping the window title, the masterView and detailView do not resize to fit the window.

test

However they do resize properly when using the "+" icon on the window.

Error: "the delegate <WAYSourceListWindow: 0x100505030> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state"

Thanks for your work on this!

I have your test app working beautifully. I've put together a small Swift test app and although everything appears to be working nicely, I'm getting the following error. I'm really hoping it's something small I've overlooked in IB.

2015-06-26 21:43:38.677 Testapp[41953:2757214] <WAYSourceListSplitView: 0x608000141600>: the delegate <WAYSourceListWindow: 0x100505030> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
2015-06-26 21:43:38.677 Testapp[41953:2757214] Split view bounds: {{0, 0}, {480, 270}}
2015-06-26 21:43:38.677 Testapp[41953:2757214]     Subview frame: {{0, 0}, {200, 270}}
2015-06-26 21:43:38.678 Testapp[41953:2757214]     Subview frame: {{201, 0}, {281, 270}}
2015-06-26 21:43:38.678 Testapp[41953:2757214] The outer edges of the subview frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)

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.