Does NSSplitView autosavename work? - objective-c

I can't seem to get NSSplitView autosave to work - can anyone confirm that by adding an autosavename in IB it should work ? I am using auto layout but my splitView is not remembering the position of the divider.
EDIT
I would expect the position of the divider to be remembered between application restarts. All I see is the divider position always starting at the default position that was set originally in IB.

Well strangely enough this now seems to be working! So I guess I can answer my own question - YES setting an autosave name in IB should result in the SplitView remembering the divider position between application launches.
No idea when it started working or why it was not working for a while. My bad no doubt.
FYI I am using a subclassed NSSplitView with autolayout. One thing I have changed is I load the right views at runtime now. Anyway for those struggling with splitViews, they can be made to work with some fiddling it seems.

Related

UICollectionView constraints doesn't allow to scroll

I'm expecting an issue with my UICollectionView, basicallly when I clear the constraints it scrolls perfectly though I can't reach the bottom (but that's another day's matter), however the width is way too big, I only see the left half of my UICollectionView.
Now, when I set my constraints to make it fit the screen, it won't scroll anymore. Even the UIRefreshControl isn't triggered.
I ran out of ideas, does somebody have a clue? or a solution?
Thanks a lot!
Edit:
It doesn't scroll though it bounces...
Nailed it:
Deleted my UIViewController from StoryBoard and created it again…
Looks like there's no proper solution though.
By checking the box bounce vertically , fixed my problem.

How to disable accessibility support for the divider of a NSSplitView?

I have a NSSplitView in my app. Its divider position is fixed, the user is not able to drag the divider around. Now I am adding support for accessibility. When using VoiceOver, the user can select & drag the divider. That breaks my UI.
How can I tell VoiceOver, that it should ignore the divider?
I am using the new Accessibility Protocol available since OS X 10.10.
Setting splitView.isAccessibilityElement or splitView.isAccessibilityEnabled to no does not work.
Thanks for your help!
Ok, I asked a nice guy from the AppKit team at WWDC.
He told me that this is not possible at the moment - because I can not acces the divider within the splitView.
Explanation:
Disabling the accessibility support on a NSView, makes the particular view inaccessible, but not its sub view - which is the desired behavior normally
Since the divider is a subview of NSSplitView, this does not work.
Solution:
I ended up not using NSSplitView anymore because I don't need any of the class specific features. The dividers are fixed in my application.
Instead I used NSStackView to encapsulate my subviews - and it works perfectly. (Hide and show subviews)

weird gap when using uiscrollview and uilabel

here is the problem i have a tow muti-line label with many content, so I use a scroll view to show them all
then I follow this to do the autolayout: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/AutoLayoutbyExample/AutoLayoutbyExample.html#//apple_ref/doc/uid/TP40010853-CH5-SW2
basic idea is to make a container view outside the scroll view to make sure the labels can fill the scroll view no matter what direction it is.
here is the hierarchy and constraint:
and the portrait mode works well:
but when it change to landscape mode some wired gap pops up!
and the more text i put in the label the higher gap i got!
my question is what should i do to kill those gap?
please give me some explicit solution or just give me an example, thank you!
and i am using autolayout in ios7, so some solution without coding are preferred!

WinRT GridView scrolling setup work differently on mouse/kb and touch

I'm trying to mimic the functionality of the NetFlix app, with a strip on the left that collapses on scrolling, I had to offset the tiles on the GridView a bit to the right so that they can accomodate that behavior. They seem to work alright in keyboard and scroll completely to the right (although I noticed the scrollbar suddenly grows in size when I hit the left boundaries. this totally changes when I use it on touch - I seem to have a limit on the right and the scrolling doesnt scroll past the last 100 pixels or so. how do I take care of this.
I'm assuming it is related to the bug here, but didn't seem to solve the problem with that solution there.
"Sticky scrolling" issue in WinRT XAML GridView control
Jay, I bet you solved it in the meantime. But I'll add my solution here anyway; it might save time for other fellows.
This effect - not being able to scroll to the very right end horizontally with touch - did go away when I either:
*) changed the VirtualizingStackPanel to a StackPanel
OR
*) Grouped the GridView (with VirtualizingStackPanel in the ItemsPanelTemplate) into a simple ScrollViewer
Hope that helps!

Is there a tutorial somewhere about designing a really large view and put it in scrollView using storyboard

The question may be similar with
Designing inside a scrollview in xcode 4.2 with storyboards
but none of the answer there makes sense at all.
Okay I created a new controller and I added a scrollView.
The very first thing I noticed is there is NOWHERE to specify the content size of the scrollView.
Not in attributes inspector, not in size inspector.
Then what?
I am expecting some larger than normal box where I can draw all the view I want to put in. There is no such thing either.
I am very frustated.
All the "tutorial" out there tell about how to fill scrollView using code.
Another thing I tried is to select controller go to size inspector and then choose FREEFORM.
Great. I still can't make that template big.
Should I do this in XIB instead? At least on that one I can have one huge UIView. Or what is the official way industry standard way of doing this? Is there a WWDC for this one?
Say I want to draw something like these:
I don't think you can get a tutorial on this as it is simply impossible in IB. As most people already commented out what you want to do here need to be done programmatically.
If you are using XIB you can set up all your content there. Under the size tab (in the inspector) you will need to change the height to fill all your content but you still need to set up your contentSize programmatically.
For storyboard I don't think it is possible to change the size of your scrollview in IB.