Anytime I add a tab bar controller to XCode the tab bar is greyed out and I can't see any of the tabs in the storyboard. At runtime it displays fine. I can't figure out why it is happening.
Add an image to the Tab Bar Item and you will see the normal view of the tab bar on the specific View Controller where you changed it. When every single Tab Bar Item got an image you will also see the normal appearance in your Tab Bar Controller.
Setting an image for the Tab Bar Items and restarting xcode fixed it for me.
In the assets folder (or wherever your image is kept), set 'Render as' to Original image
It looks like this was a bug in the XCode UI. This has been fixed in later versions of XCode.
Related
I am looking at this SwiftUI tutorial and it suggests I can see extra actions upon Command-Clicking the SwiftUI elements in code. In my Xcode, this jumps me to the class definition.
I see there's an option in XCode 11.0 t change the Option key to show SwiftUI inspector, however, this still does not let me modify SwiftUI code elements using actions like "Embed in VStack"
How can I get both inspector and extra SwiftUI actions when interacting with SwiftUI Code (not the preview)?
Extra SwiftUI actions show when Canvas is opened (shortcut: Option-Command-Enter or ⌥+⌘+↵):
canvas is closed
canvas is opened
The accepted answer doesn't work for me on macOS 10.15.5 and Xcode 11.4.1.
The Good news is that you can get it via a shortcut of [Command][Shift][Left Click] on a SwiftUI element or by clicking Show Code Actions on the right click menu.
Instead of using the mouse, I recommend using the Xcode hotkey for bringing up code actions. Navigate to Preferences -> Key Bindings and search for Show Code Actions. You'll see the preset hotkey which you can then customize. My default key binding was Shift+Command+A. Just make sure you cursor is over the intended element when you press the hotkey.
You can change the command click behavior where you were looking under Xcode -> Preferences, Navigate tab.
Rather unintuitively, if you pick "Selects Code Structure", then command+click will bring up the SwiftUI menu options you're looking for (granted the canvas is open).
If you do this, you can still jump to definition via control+command+click
Conversely, if you'd prefer to continue to use command+click to jump to definition, you can instead use control+command+click to bring up the SwiftUI menu options.
Command clicking on a view will not work in Xcode 12.2 and 12.3 (under MacOS 10.15.5) if you have your preferences different than Xcode expects.
You have to change your Navigation preferences for Command-click on Code: to Selects Code Structure before the proper menu will appear when you command click on a View.
To change this. press command , to open your preferences and select the Navigation button. The option you need to change is in the first popup menu.
not sure when storyboard convert views like this. I re-installed xcode. but no luck. Xcode version is 8.3.2 (8E2002). How do I get previous view.
thanks
Open storyboard and then go to Editor -> Canvas -> Show Bounds Rectangle and uncheck it.
It looks like the storyboard content is not getting properly rendered. You can try opening a smaller storyboard and see if the content is rendering properly to know whether it is specific to this larger storyboard.
If a smaller storyboard works, try to isolate the issue in your larger storyboard by temporarily removing scenes and reopening the storyboard. Sometimes these rendering issues can be caused by a particular scene configuration.
The report a bug banner button at the top-right may provide some logs giving clues to the issue. Feel free to send those to the Apple Bug Reporter
I have a tabbar in my app and in one of the tabs I want to navigate to another view controller - I know how to navigate But the problem is when I used that I can't see the tab bar in the bottom that means I can't go to the other tabs when I navigate
Hard to answer without a visual but it sounds like your hierarchy is off. Make sure any content like background images aren't above the nav bar in your view or else it will block the nav bar when you run the app.
I have a "Slide Show" control and I'd like to remove the first "X" button in the tool bar of the control. I have checked .ascx and .ascx.cs file to see if there is any related code, but nothing.
I think these buttons are from Core DB and I don't know where I can remove or hide this "X" button in Sitecore.
Could you help me, please?
Find Slide Show sublayout in your Sitecore tree.
Scroll to Editor Options section and remove Delete from the Page Editor Buttons field.
I recently upgraded to xcode 4. My application utilizes tabbarcontroller. In old xcode 3.x, you were able to change the tabs to different types per this screenshot:
From what I gather in researching this issue, xcode 4 no longer offers this functionality. Am I missing something? From what I researched we are now suppose to delete/add tabs then change attributes to get the desired effect. So, to that end in xcode 4, I've added a new tab item and made the class a UINavigationController fully expecting the ability to toggle the "Shows Navigation Bar" with a checkbox. But, the "Navigation Controller" grouping never appears. What am I missing?
Thanks for your help.
I was surprised at first too and I was about to ask the same question. But, when you open the Object Library, in the bottom you can see a big star, "Tab Bar Item". Just drag that to the tab bar and you will notice a new item added to the tab bar controller.
Weird but works!
Just drag drop View Controller onto tabs!
Thanks
I played with xcode 4 a little bit more and discovered you can drag Navigation Controller from library onto your UITabBarController and it will create your tab item for you and set it up as a NavigationController. Pretty cool. Hopefully this will help others.