Xcode Storyboard Zoom Magnification - xcode

I'm currently using the storyboard feature to position views. Due to the nature of these views, they need to be positioned with precision.
I'd like to view the Storyboard Scene/View in a magnification/zoom level greater than 100%, but it doesn't seem to be possible using the standard zoom in/out feature.
Is it possible to do this?
Note - I understand how to use the 'Size Inspector'.

It doesn't look like there is a way to do this, but there is at least one alternative that works fairly well:
Go to System Preferences > Accessibility > Zoom
Turn on the keyboard shortcut or scroll gesture
You should now be able to zoom in on any part of the operating system, including storyboards.
To make editing even easier, enable these options, some of which are found under More Options...:
Turn off Smooth images
Change Zoom Style to Picture-in-picture
Window Position: Follow mouse cursor
Cursor style: Crosshair
Enable temporary zoom

No, I am almost positive it is not possible to do this. You are stuck with 100% zoom. However, if you need great precision, you could try selecting the element you wish to move and use the arrow-keys to move the item around accurately.
However, like MacN00b, I do not use Storyboards a lot, so perhaps there is some top-super-secret setting buried somewhere.

This is one of the reasons I don't use storyboard but prefer good old fashion individual xibs. I don't think it is possible to zoom in past 100%, you may try double clicking on the background, I know that normally zooms in.

Related

Scrollable large NSDocument on Macbook Pro 13" XGA display

I'm having all kinds of trouble understanding how NSWindows can have larger documents than the window bounds in them.
Unfortunately, layout and contents prevents me from simply shrinking the document (and I wouldn't want to make the layout cramped for those with larger screens).
A school needs to run this app on their new 13", non-retina MacBook Pros. Scrolling is acceptable to them, but I'm unsure as to the approach, and I'd like your advice on the best way to handle this to avoid forced scrolling on larger screens.
I've tried setting the NSWindow min and max size and embedding the document in a Scroll View. But even though you can see part of the document view sticking out, no scroll bars appear (I have set them to Always in sys prefs).
If this is the way to go I would appreciate a link to a tutorial on this exact subject, because I'm a bit lost with all the measurements and options.
If not I'd like a pointer where to start and what to read. I'm experienced with Cocoa Touch but a relative newcomer to Mac development.
Without more information it sounds like you have embedded a NSScrollView but didn't set up the springs and struts properly to allow the scroll view to resize when its parent view (assuming it's the window) resizes.
You might want to check out Specifying a View’s Behavior as Its Container Resizes in the Interface Builder Help documentation.

NSScrollView and lion .. is it possible to only show scrollbars when scrolling

Is it possible to have an NSScrollView ignore the system preferences setting and only show scrollers when scrolling. My application is designed for the overlay style scrollers only unfortunately, so I want to avoid having to adjust the containing content views.
Is this possible?
I would take a look at NSScroller's setScrollerStyle:. That should do the job.
However, I'd like to share that I personally think forcing users into using one style of scrollers over the other is indicative of bad design. The system allows users to choose and I believe apps should honor that choice. The fact that your content view doesn't handle horizontal nor vertical resizing is a big red flag and I would revisit that design choice.
Good luck.

Customizing slider in WP7

I have experienced some trouble with the Slider control on WP7. When I am dragging it, it will only drag a little bit, and then it goes back to where it started. If I let go of the slider quickly, then it goes a little further. E.g. if you want to drag it from the start to the end, you will have to quickly drag many times. What I want is a smooth slider, which follows my finger and stops until I release my finger, and it should stop where my finger is. Any way to get this the way I want?
I am also having a bit of trouble customizing it visually. How can I resize it and put it in the middle of the parent controller? Now, it puts itself in the top section, even though Vertical option is set to bottom..
How do you know where your finger are? Your finger is obviously going to be larger than the Slider itself.
The default slider is perfectly smooth. So all you're complaining about is the level of precision. You won't get 100% precision with a touch-interface that depends on the calibration of touch-input on your touch-screen.
Either you make the slider go in steps (which isn't smooth), or you accept the lower level of precision.
I finally solved the issue. The problem was that you can not(for some odd reason) have a slider and a gesturelistener at the same page. I removed the gesturelistener and the slider was smooth. I will not call that bad programming skills, this is definitely a bug, because the gesturelistener was on a totally different control in the page.

Can I change NSScreen visibleframe?

I trying to create a toolbar that docks on the top of the screen below the OS X menu bar.
I would like no other application's to be able to overlap my application when they are maximized. I can get the visible frame dimensions using NSScreen's visibleframe method, but can I adjust the visibleframe to omit the size and position of my application?
The simple answer is that no, you can't. I think that the only way to change the screen's visibleRect would be to inject code into AppKit and swizzle the method.
Even then, it might not do what you want because that method might not be what Apple uses to determine the "safe area" for windows and almost certainly would not work with Carbon apps.
Nothing you do with window levels will change this.
What you could do is use the Accessibility framework to reposition windows if you detect that their frames have changed such that they overlap your toolbar window. Unfortunately, I think you might need use polling for this.
Try setting your window's level to NSDockWindowLevel.
This may not work, depending on whether the system subtracts all windows on that level or only ever the Dock's window, but it's worth a try.

How to add left/bottom/right panes to Mac application as in XCode?

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.

Resources