removing some Grey Object on View Controller - ios

I was trying to use navigation controller. But end up in adding some grey area on my view controller.
I have tried to remove it but failed.
I have checked if there is some navigation controller item has been added under my view but cannot find.
I cannot even click that item.
Can some one help me in removing this grey area. It was added when I was trying to add navigation bar controller from the library
I have added the image. Please check. I cannot remove it.
Actually I added the navigation controller but I think I cannot add it correctly.

Solved.
How
1) opened the Main.storyboard file in external editor i.e. Text Edit
tried to search which xml element with title equals to some button which is close to this like button 2 or 0
i found tool bar item which was added with mistake.
here is the code i removed it and it worked.
i have given two options to remove. Even if the code which is mentioned below in the heading Removed (2) is there , still they grey item will be shown there.
The annoying thing is ,we cannot select this item and it is no visible in the item hierarchy under the view.
Removed (1)
<toolbarItems>
<barButtonItem title="Back" width="103" id="732-cW-LpG">
<connections>
<segue destination="BEC-Jo-iar" kind="unwind" unwindAction="cancelToPlayersViewController:" id="ddb-5K-wuv"/>
</connections>
</barButtonItem>
</toolbarItems>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
Removed (2)

Related

How to remove the Tab top title on iOS?

I have a tab group with two tabs. The tab name is being displayed two times, one under the tab icon on the bottom and one on the top of the app just under the status bar.
I want to remove the top tab title on iOS.
Thanks.
Regards
You can set navBarHidden:true to your Window inside the tab to remove the navigation bar.
Because you want the navbar to remain, and don't want a title. Don't set one! By default there is no title on the window, and window title and tabbar title are separate! This is how it should look after:
<TabGroup>
<Tab title="required">
<Window></Window>
</Tab>
</TabGroup>
Same structure can be applied when you use classic.
If you want to remove the title at some point instead of always, you can just call window.title = ""; and it will be removed. Of course replace "window" with the variable or alloy id (in which case it is $.id)

Xamarin toolbar item changes color after its clicked if Navigation occurs in IOs

I have a toolbar item implemented in Xamarin Forms project in xaml like this.
<ContentPage.ToolbarItems>
<ToolbarItem Name="Create" Command="{Binding AddNewCabin}" Text="Add Cabin" ></ToolbarItem>
</ContentPage.ToolbarItems>
The command AddNewCabin is binded to a navigation method.
When I come back from the next page the text for the tool bar item is paled out like a visited link. I have no idea how to turn off that kind of behavoiur.
I thought that was an issue with a click event however I tried binding the click or the command to an empty method and the text is not paled out. It is only paled out if there is some Push navigation that occurs afterwards using this event.
I have also tried navigating using other events on the same page from listview for example and in that case the toolbar item is also NOT paled out.
So the only occasion when it is paled out (changes color) is when I navigate using the commnd or event binding of the toolbar item. In all other cases this doesn't occur and I have no idea why. Does anybody know? Thanks.
PS. I Aam testing in IOs.
Sadly, I cannot reproduce behavior of your toolbar item. On my machine navigating from toolbar item works perfectly. Check my gif. Colors of button "Add" are switching properly.
You should try removing and adding your button on the OnAppearing event.
But this is very strange behavior. Can you post more code of your implementation?

How to fix a Tab as first tab on TPageControl and keep it showing while navigating on tabs?

I have this form:
Green arrow: Tab General, and I'd like to keep it always visible, but when the form is smaller than the tabs, TPageControl creates a navigator (the red arrow).
It's good, but I'd like to allow the user navigate but keep showing the possibility to click on the General Tab.
Example:
In this picture, I used the navigator and I can't see General Tab anymore.
I'd like to keep it as the first tab on the PageControl, like a "fixed column" in Excel for instance.
Yes, I didn't found a way to fix the tab! But I solved my problem creating a custom page control based on our discussion on this thread.
You can check it here

How to select background views in a storyboard or xib

If I select a view with my mouse in a storyboard or xib, Xcode will select the front most view. I know that I can select the other views in the document outline, but if I want to grab a background view to move it with my mouse, the front most view gets selected again when I click in the storyboard.
I think there is a way to cycle through the views and select the ones in the back by holding down on some keys, but I can't find what it is. Does anyone know?
I'm using Xcode 4.6. I know that I can also move background views using the size inspector, but I'm looking for a way to position them with my mouse.
One way is to use the jump bar at the top of the editor. It's the control that shows the path of objects leading to the current selection.
Another way is to press control+shift and left click (or shift right click) an item. That shows you all of the objects under the mouse in a menu, and allows you to disambiguate the one you meant to select.
The good news: Place your mouse on the overlapped images, press and hold shift and right click the mouse. You should see the list of objects, select your object in the back. You can resize as you wish.
The bad news: you can only use the cursor arrows if you want to move it!
Select the view from the menu on the left of interface builder.

Change the listing order of the view controllers in Xcode storyboard

I'm just starting my first application using storyboards. I'm using Xcode 4.5 and iOS 6 SDK. I want to know how to change the order in which the controllers are listed in the Document Outline (panel to the left of the storyboard).
In Latest Xcode 13 you can manually reorder storyboard scenes. Just drag&drop in the left pane.
Old answer
In Xcode 11 you just open storyboard XML and move specific "scene" to proper place under "scenes" tag. And that's it. The order will correspond to Document outline.
In Xcode 5, the order of the view controllers/scenes listed in the storyboard's "Document Outline" seems to be determined by an alphanumeric sorting of the sceneID attribute values in the storyboard XML file.
After upgrading to Xcode 5 from 4.6 the Document Outline seemed to list my scenes in a random order. I inspected the Storyboard XML file (right click on storyboard file -> Open As -> Source Code) but the order of the scenes was correct. After further investigation I realized the sceneID attribute values were the issue. I found each sceneID attribute and added an alphanumerically increasing prefix to the value. For example, for the first scene that should appear in the Document Outline I prefixed its sceneID value with a "1a", for the second "1b", for the third "1c" and so on. After doing that for all my scenes, they had a proper listing order in the Document Outline.
I think the sceneID values are probably only used for unique identification/ordering purposes, so hopefully changing them doesn't cause other unexpected problems. But I'm still able to work with the storyboard in Interface Builder without problems and my app seems to work normally. So if this problem is irritating you as much as it did me, you might consider this workaround until Apple gives us a proper solution... just be sure to make a backup first!
In the Document Outline, drag the orange view controller icon. As you do this you will see the blue horizontal insertion point appear between the grey boxes. Let go and the whole grey group box for the view controller will relocate.
At least for Xcode 4.6 , the scenes are in the order they're stored in the storyboard xml.
So you can open it with a text editor and reorder the tags to you liking, and start Xcode.
I am not sure if it is still meaningfull for you.
As of xcode 6.1 you can rightclick your storyboard file, choose "Open as..." -> "Source code" and change the order of view controllers rearranging sections order. I can't move them by drag'n'dropping view controller icons for unknown reason, so it is the only way that works for me.
For Xcode 5.1.1, you have to change the order of tag segue. Open the storyboard as source code (Right Click -> Open As -> Source code)
<segue destination="Bdn-Z8-Ql8" kind="relationship" relationship="viewControllers" id="0DS-1d-02F"/>
<segue destination="KY3-Z9-s1u" kind="relationship" relationship="viewControllers" id="u45-Ly-JkB"/>
<segue destination="k72-nP-MyV" kind="relationship" relationship="viewControllers" id="TAj-be-l8p"/>
<segue destination="gcA-x5-8Iw" kind="relationship" relationship="viewControllers" id="B7T-js-1Vs"/>
Changing the order of the above lines will change order of ViewControllers
It seems that the view controllers belong to the tab bar controller, so the order of the buttons determine the order not the position of the view controllers on the screen. You should be able to drag and drop the buttons.
Just Drag and Drop the icon on the bottom in your first View Controller Screen. Xcode 11.6

Resources