I'm on Xcode 9.4.1 and usually there is a "very for Trait" button in the right side of the pane where you can configure the device the storyboard should display. But for one app, I only see iPhone in the device pane (I don't see iPad) and I can't see the "Vary for Trait" button in the storyboard, is there any setting I need to configure to have it shown?
When viewing your storyboard / xib in Interface Builder, make sure the right pane is open (or click the button in the top right farthest to the right)
Make sure you have selected the root view for which you wish to have traits enabled.
Click the document icon to open the general document panel (with the first category of "Identity and Type")
Enable "Use Trait Variations" under "Interface Builder Document"
This will enable the "Vary for Traits" button, along with the various + buttons throughout the document and view options.
Related
It is possible to configure a transparent button in Vector Panel Design version 11, such that I can see a picture under the button, but can't see the button at all?
Right-click the button and choose "Show properties".At the top of properties window, there is a small buton - "Properties". It shows all properties of the button , including "General" - "Is Visible At Runtime".
It may help for your demand.
I am building a preferences window for my app and would like to achieve the same "look" as the NSToolbar that Finder uses. When selected, the toolbar buttons in Finder look "pushed in". On the right-hand side of the image is my preferences window - you'll notice that even though General is selected it does not look "pushed in". How do I achieve the look of Finder (and most other built-in apps)?
Thank you,
CS
When you build the toolbar in Xcode you add toolbar items to it. Each toolbar item can be customized in the right pane of Xcode. Choose "Selectable" as behaviour and it works as you expect.
My scene dock is hidden... How can I make it visible? The red one is missing
You can find this button in below left side just click it
..you will get what you need..
Enjoy..
Not exactly sure what do you mean by scene dock.
But I guess you can see different windows by changing your selection here.
if so, Click that Hide Document Outline then you ll get that missing window.this is Hide Document Outline button
In Xcode you could see the following Menus, File Edit View Navigate Editor Product Window Help inwhich Click View and click Debug Area and then click Activtae Console.
You can get the window that what you expect
I've created an interface nib/xib file. The app is basically working, which is cool. The standard toolbar buttons look bad, they're glossy and raised, while most apps in Lion have the flat, inner bevel look. So I created some image toolbar buttons and put them in the toolbar and they look great, but they're all disabled by default.
Is there a way to give these the correct state in InterfaceBuilder or do I have to use code to give them the proper state.
Cocoa and Objective C are very unfamiliar so it would be helpful to me if I just knew what to search for. Most of my searching brings me results for creating custom buttons for iOS.
I figured this out, here's what you do:
In the nib/xib file, double click your menu bar to show the "allowed toolbar items" sheet. From here, choose your button that you've created. In my case I'll select a back button that I want to connect to a webview control. Ctrl click + drag from the button to what you want to connect it to and then make the appropriate connection. In my case I choose goBack from the WebView.
Once it has a connection it now becomes active.
XCode works in mysterious ways (at least to me).
I simply want to create a Preference pane in my app. When I run my app, the stock menu bar comes up (Apple, MyApp, File, Edit...) and the "Preferences" menu item is grayed out. It makes sense since I haven't started playing with it.
How on earth do I add/remove/activate/inactivate menu items? I'm not talking about adding anything new, simply using what should be there.
Thanks in advance.
NSMenu has "Auto Enable Items" enabled by default. That means if the menu item does not have it's action message hooked up, it will appear grayed out. So in your case, you would simply set the Preferences menu item's "Sent Action" to whatever action shows your preferences window. This can be hooked to some sort of showPreferencesWindow: method of your AppDelegate, or directly to the showWindow: method of a window controller.
To dynamically enable/disable menu items the best way is to implement the NSUserInterfaceItemValidation protocol which is excellently documented here
Edit: Your app's menu bar items live in the MainMenu.xib file. The menu bar appears as a "Main Menu" object on the left hand side (if you're using Xcode 4) Simply click on the items to modify them, and you can Ctrl+drag connections to and from them like any UI object.