Giter VIP home page Giter VIP logo

dmsplitview's Issues

Sizes of views change on window resize

Hey,

I know this is not trivial and you may ignore me if this is to much work, but would be nice to have.

When the window resizes the views changes size also. It is desired that when window resized only the middle view should change size while the left and right view should stay at the same size. Check out XCode to see this behaviour.

Message being sent to delegate when it should be sent to eventsDelegate

In the following method:

  • (BOOL) setPositions:(NSArray *)newPositions ofDividersAtIndexes:(NSArray *)indexes animated:(BOOL) animated completitionBlock:(void (^)(BOOL isEnded)) completition

near the top of that method, you have the following:

        if ([self.eventsDelegate respondsToSelector:@selector(splitView:splitViewIsAnimating:)])
            [((id <DMSplitViewDelegate>)self.delegate) splitView:self splitViewIsAnimating:YES];

You should be sending the call to splitView:splitViewIsAnimating: to self.eventsDelegate, but you are actually sending it to self.delegate

MaxSize is ignored

When dragging pane dividers, the MaxSize of a pane is not taken into consideration; only the MinSize.

MaxSize seems to not take effect on initial resize either.

Alignment bug with centre aligned subviews when toggling panels

If you have a subview within a panel that is supposed to be aligned centred (either no strut is selected or the top strut is the only one selected for Autosizing in Interface Builder), then when you toggle any of the panels, the subview will end up being right-aligned instead of maintaining its centre position.

For example, the initial view with the icons properly centred:

Screen Shot 2013-02-16 at 6 35 46 PM

Then after clicking on the Toggle buttons (left and right), it looks like this:

Screen Shot 2013-02-16 at 6 35 58 PM

It's happening in the example app and in my app that's using DMSplitView too.

I'm not sure what's causing this problem. It doesn't happen if you drag the left pane so it's fully closed, but it does with the right most pane. It also doesn't happen on the left pane if you double-click on the divider bar to collapse or expand the view.

Also, after this happens, no amount of dragging the divider bar will correct it. The subview (the icon in this case) is stuck to the right edge of its superview.

And it doesn't matter if you use animated transitions or not. Same problem.

Any workaround for this that you know of?

Splitview inconsistent state error when using autoSaveName to restore state of split view

When you set an autoSaveName for the split view, collapse a view, then quit and re-launch the app, the following error is displayed:

<DMSplitView: 0x100192e20>: the delegate <DMSplitView: 0x100192e20> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
Split view bounds: {{0, 0}, {816, 337}}
Subview frame: {{0, 0}, {100, 337}}
Subview frame: {{110, 0}, {644, 337}}
Subview frame: {{764, 0}, {152, 337}}
DMSplitViewExample[41225:303] 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.)

The same thing is happening in my app as happens in the example app.

Crashes when resizing window

Very nice controller. Thank you for sharing it. Right now it crashes when the window gets resized. In your demo you can test this by resizing the window down.

applyPriorityResizeFromOldSize: can incorrectly skip height resizing on certain views

High level overview of the bug: You're using a dictionary for priorityIndexes, so you effectively loose sight of view indexes if you have 2 or more subviews set to the same priority.

Here was my specific scenario:
I have a vertical DMSplitView with 3 subviews. I want the middle subview to be resized when the window is resized, but I'd like the outer subviews to stay at a fixed size (unless they are manually resized).

So in my setup, I had the following priorities set for my subviews:
subview 0: 490
subview 1: 1
subview 2: 490

Because priorityIndexes uses priority as the key, it lost sight of subview 0 (because when I made the call to setPriority: 490 ofSubviewIndex: 2, that overwrote the entry in the dictionary for subview 0.

The main problem this created was that subview 0 would no longer get vertically resized because subview 0 wasn't in the priorityIndexes dictionary anymore.

The obvious workaround for my case was to simply set subview 2's priority to 489 and now it resizes as expected.

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.