Xcode not allowing me to see full target names - ios

My Xcode is acting weird like this:
For some reason I cannot seem to expand the Targets and Project tab so I cannot see which target is which.
Why is this question being down voted so much without a single comment
? I already tried moving the slider/divider to the right.

It's a bug: every once in a while, the column of project and target names gets "wedged" in this position.
But the workaround is pretty easy: make the window wider / narrow until the expander widget starts working again. You might also have to switch out of target editing mode to the code editor and come back again. Basically you're just trying to slap the target editor on the side of the head.

Related

Xamarin.Forms labels not working anymore, on iOS

I am making a Xamarin.Forms project, and I am in the end of my app, but something really strange have happened. My app starts up with no labels (!?), meaning they are invisible or not created at all. Everything else seems to be working, until I press a button that is supposed to change the label - when I do this, the app freezes. I get no exception in Visual Studio, though.
One problem is that my breakpoints in PLC code never hits, only those I place in the iOS code. However, the buttons not related to changing a label works, so I know the PLC code have been ran. If I let the app run for a little while, and then press the pause-button in VS debugging to see where in the code I am, it stops at
UIApplication.Main(args, null, "AppDelegate");
.. in Main.cs. I dont know if this is correct or not, when I run on Android, I get a Break Mode - No code is currently running.
I have been trying for hours to debug, reinstall, restart, clean and rebuild, but nothing seems to help. My code works perfectly in Android, and it worked in iOS 1 week ago. Anyone have any ideas what is going on, or what I can do to debug some more? Or must I make a new project and try start over?
Edit: I have also tried different starting pages, and all are the same: all views loads except those with text in them. I have a page with an Editor in it, and I can write in it, but no text is appearing inside of it. Only button have visible text. I do not use a custom font for my labels, I have not specified anything.
Waking up fresh in the morning, I found my issue in 15 minutes..
After altering my Google search to TextView iOS instead of Label Xamarin, I found much more answers. Thanks to this question and answer.
Basically, changing anything on the labels in the constructor of the page (even after InitializeComponent()), will mess up the view. I moved my code outside of the constructor (in the protected override void OnAppearing() method), and now it is working again.
The freeze part was not related - this was my custom menu that covered my screen with an invisible layout eating up all clicking events. A bit confusing, none of these issues are present in Android, but there you go.

Xcode rebuilding constantly after implementing a class

I recently used this "iOS Color Picker" (the top response) from StackOverflow into my project. It's absolutely fantastic, and draws straight into Interface Builder - however, it also seems to cause Xcode to rebuild constantly.
As soon as I type one single character, Xcode rebuilds the entire project and it's getting incredibly tedious. All the information I could find on the matter tells me to turn off "Live Issues" under the Xcode prefs - but as a relative beginner to coding, I rely heavily on being able to see errors as they appear.
My question is: is there any way to turn off this constant rebuilding WITHOUT disabling "live issues"? (either by altering the iOS Color Picker code, or some other option in Xcode itself?)
Thanks!
It is caused by the IB_DESIGNABLE definitions in the source header files. Probably it makes problem only if the header file containing IB_DESIGNABLE is included (even implicitly) to the source file you are currently editing.
I did not find a definitive solution how to disable IB_DESIGNABLE and thus compiling the storyboard and the source files continuously. I would appreciate an Xcode flag to disable this temporarily. I tried also surrounding the IB_DESIGNABLE with #ifdef macros but they are considered even if the #ifdef evaluates to false. Commenting out one by one the IB_DESIGNABLE helps but it is not a feasible solution with many IB_DESIGNABLEs.
Update
I finally found a quick way to avoid this annoying behavior. Having the storyboard opened in the active window, disable "Automatically Refresh Views" from the Editor menu. This will stop updating the views in the storyboard editor that use your custom code and thus speed up your development significantly. When you need again the just-in-time compiling to have a visual preview of your custom code, enable this option again (it seems you also have to re-open your storyboard to make it working again).
You may wish to add a key binding to the command, such as command-option-control-A, to easily toggle the behavior on/off. To add a key binding in Xcode, touch command-comma for preferences, choose the Key Bindings tab, use the search bar to find the command, then double-click on the right area to add your desired keystroke.
"Leave it off" approach
Alternately turn "Automatically Refresh Views" off, and never turn it on.
Make a convenient keystroke for "Refresh all views", say command-option-shift-R
As you work, just touch command-option-shift-R from time to time, or as needed. It's generally only necessary to touch command-option-shift-R as you work on the storyboard.

Xcode storyboard discrepancies across version control

I am having quite the annoying problem with my Xcode storyboard. I have a project controlled through svn version control and everything seems to be copying over fine with the normal merges and commits. When I make a change to the storyboard and commit it, say just a dummy label, and my partner updates his project with the latest commit it shows up fine, just like it is on my own project. However, when my partner adds a dummy label and commits, my update does not show the project on the screen. It only shows the label on the scene viewer. This is also happening with tableviewcontroller's inside of other view controllers, or really anything that he updates. When the app is run the app shows everything that it is expected too, but this does not make sense as the storyboard file is not showing these things. I am not sure what is happening as nothing seemed to be wrong early on. Any help or guidance is appreciated. Here is a picture detailing what I mean.
http://imgur.com/MkJIuhC
If you would like more info about this please leave a comment!
Looks to me like you just need to update the size class when you or your partner opens up your project like so:
and choose whatever size you find appropriate for your app

Missing Device Options next to run button in Xcode

I am missing whatever the thing is called that is a drop down menu allowing one to select between devices and simulators to build and run onto. I have had trouble searching for a solution because I don't know what this thing is called.
It seems, that your display is not wide enough. (maybe the name of your target or device is too long?).
You can select the target and device like this, too:

Xcode keeps building storyboard after each keystroke

My Xcode project using a storyboard entered in a very weird state recently: Xcode keeps building the whole project and notably the storyboard after each keypress. I found no reason for this behavior neither in my project diffing all interesting files (storyboard and project) neither a setting in Xcode (maybe I just could not find it?) Needless to say that this "feature" makes working on my project nearly impossible since the CPU is constantly occupying with rebuilding the storyboard when I type new code. Anybody seen this?
It is caused by the IB_DESIGNABLE definitions in the source header files. Probably it makes problem only if the header file containing IB_DESIGNABLE is included (even implicitly) to the source file you are currently editing.
I did not find a definitive solution how to disable IB_DESIGNABLE and thus compiling the storyboard and the source files continuously. I would appreciate an Xcode flag to disable this temporarily. I tried also surrounding the IB_DESIGNABLE with #ifdef macros but they are considered even if the #ifdef evaluates to false. Commenting out one by one the IB_DESIGNABLE helps but it is not a feasible solution with many IB_DESIGNABLEs.
Update
I finally found a quick way to avoid this annoying behavior. Having the storyboard opened in the active window, disable "Automatically Refresh Views" from the Editor menu. This will stop updating the views in the storyboard editor that use your custom code and thus speed up your development significantly. When you need again the just-in-time compiling to have a visual preview of your custom code, enable this option again (it seems you also have to re-open your storyboard to make it working again).
You may wish to add a key binding to the command, such as command-option-control-A, to easily toggle the behavior on/off. To add a key binding in Xcode, touch command-comma for preferences, choose the Key Bindings tab, use the search bar to find the command, then double-click on the right area to add your desired keystroke.
"Leave it off" approach
Alternately turn "Automatically Refresh Views" off, and never turn it on.
Make a convenient keystroke for "Refresh all views", say command-option-shift-R
As you work, just touch command-option-shift-R from time to time, or as needed. It's generally only necessary to touch command-option-shift-R as you work on the storyboard.
I had this problem and the accepted answer did not work for me.
The problem I had was that I always keep the storyboard open in it's own tab within XCode so that I can access it quickly.
The only way I could fix it was to either close that tab or select a different file (like a normal code file) and then close and reopen XCode. Thereafter it was no longer rebuilding on each keystroke.
Be warned however if you need to open the storyboard to make changes then this problem can sometimes reappear and I will have to repeat the above process.
Can't wait till Apple fixes this as it is very frustrating indeed!
(ノಠ益ಠ)ノ彡┻━┻

Resources