Working with large views in Xcode and Interface Builder - objective-c

I am new to Xcode and I'm currently working with a view which is rather large. I am using a scroll view which works perfectly when I run the application, however I find it difficult to work with such a large view in interface builder. Is there any tricks such as making the working area in Interface Builder larger? Or should I simply stop using interface builder and instantiate the GUI-components programatically?

You can change your view size to freeform and set its size to anything you like just for looking at it and then set it back to its original size

There are buttons in the upper right corner of the project window toolbar that will hide the navigator and inspector.
Click the left button to hide the navigator. Click the right button to hide the inspector. Hiding the navigator and inspector will give you more room for the Interface Builder canvas. I recommend starting by hiding the navigator because Interface Builder uses the inspector for many tasks.
Another way to get more room for the canvas is to use the icon view for the object list, which is to the left of the canvas. There is a button in the lower left corner of the canvas that toggles the icon and hierarchical views of the object list.

Related

View hierarchy used by the Pages Mac OS X app

I need to build a Mac OS X app which requires view hierarchy similar to the Pages app. I understand that their is a toolbar at the top. On the left is a scroll view that contains a custom view but I have problem figuring out the hierarchy on the right, specifically the scroll section used on the right which allows options to hide or show up dynamically depending on the other options.
This is called an inspector view. It is not apart of the public SDK; this is all private code.
If you want to see how it's made start a view debugging session in xcode and attach it to the pages process. What you will find:
Inspector View
Inspector Pane Group view and Inspector Segmented Control
Inspector Pane View and Inspector Pane Disclosure Views.
You can make this fairly quickly from existing UI views and controls.

Yosemite Toolbar Style

How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.

NSToolbar in the NSPreferencePane

I'm trying to implement my app's settings. So I implement Preference Pane but I need to insert Toolbar to it. That is how looks my IB:
And this is how looks my pane from System Preferences:
You see, my window new height = old height - toolbar height. This is my first time I work with toolbar and prefpane, can you answer is there any restriction to use toolbar iside of prefpane?
The System Preferences application already sets a window toolbar so you cannot have a toolbar in your preferences pane.
I recommend using tabs; look at the NSTabView and NSTabViewItem classes.
Note that NSTabView does not actually require tabs to be displayed (though I recommend making tabs visible to the user). You can configure NSTabView to have no tab frame and still take advantage of it for panel-swapping.

How to customize tab bar controller so that tabs appear on the top of the screen?

How to customize tab bar controller so that tabs appear on the top of the screen?Tabs should not appear at bottem of the screen.
Try this,
self.tabBarController.tabBar.frame=CGRectMake(0, 0, 320, 70);
You will need to create a custom control. The standard UITabBar does not offer the option to place tabs at the top unfortunately.
Tabs should not appear at bottem of the screen.
Actually, according to the iOS human interface guidelines, they should:
A tab bar appears at the bottom edge of the screen and should be accessible from every location in the application.
If you really wanted to do what you are asking, you could use a UITabBar directly (not touching UITabBarController). That handles drawing the tab bar itself, but doesn't do any view swapping for you. You should then write a custom container view controller using the view controller containment APIs (iOS 5 only) which you set as a delegate method on your tab bar, and then when the user changes tab, you swap in and out the relevant views.
Or you could use this open source version.
Don't make your top tab bar look like a standard Apple tab bar though, because they'll probably reject it from review. If you use a completely custom look you should be fine.

iOS layout: alternative to tabs?

I'm working on a iPhone app which shows an mobile webform in a UIWebView. I'm using a default iOS layout with a navigation and tab bar.
The mobile webform is displayed in a UIWebView in the white area. Since the webform has a lot of input fields, we really need as must space for it as possible. Because of this, we are planing to remove the tabs in the bottom. Over time, there will be more tabs/sections, so it is not a solution to just add a button for each section in the left side of the navigation bar. On a iPad a popover could easily be used to handle this.
Is there a standard iOS layout mechanism to handle this change of sections/views without using tabs?
You could do something long the lines of Path or the new Facebook app and have the "table of contents" behind the Navbar and the navbar slides away (along with the child view) to reveal it. When done right (ie smoothly) I think the effect is really cool.
This would also work great as you add more and more options, since the table could just scroll.
Here is a framework that might be you started: http://www.cocoacontrols.com/platforms/ios/controls/iiviewdeckcontroller
I would consider replacing the navigation bar's title with a control that lets you switch between tabs. You can assign the bar's titleView property to a control or a button and it will generally do the right thing.
If you're limited to 2-3 tabs, you could simply use a UISegmentedControl.
If you want more, you could use a button which, when tapped, pops up a view that allows you to select the view you want. This could be a modal table view, or you could slide up a UIPickerView from the bottom of the screen, similar to the keyboard.
I use this technique in an app of my own, screenshots here. Tapping the button cycles between views (in this case, I'm changing the contents of the table cells); tap-and-hold slides up a picker.
Another possibility would be to arrange your different forms on pages in a scroll view with a page control at the bottom, à la Weather. The best option, though, if you’re going to have a particularly long list and want to keep your screen real estate, is probably the FB/Path-style sidebar table.
I ended up using a UIActionSheet but I think it in other situations would be more stylish to use a controller like the IIViewDeckController.