Xcode 6.4 Bug? Source code text disappears. OSX Yosemite - ios

Is it just me, or does this happen to anyone else? Occasionally if I am coding inside of a huge class, the source code text begins to chop it's way out to a white screen as I scroll. However, when I vigorously scroll to the top, then back down again. The source code re-appears again.
What could be the issue? Is there a work around? This issue is so annoying!

Go to Preferences->General tab and uncheck "Show live issues" under Issues. Notice that this is a work around to be able to continue working with Xcode, at least until they issue an official fix. This glitch seems to be noticeable when you have lots of lines of code (1000+).
After this, the glitch will still be happening but not while coding but during building phase. Not perfect but at least you will be able to continue working.

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.

Storyboard corruption on file open

I am having a problem where my content is repeatedly being shifted to the right in the storyboard for multiple view controllers when I open the project. I have done nothing at this point, simply opened it. Further, undoing the modifications through git does nothing. I fix the problems and go about my day adding new features... the apps run fine in the phone and appear normal in the storyboard. However, when I open the project the next day, same thing happens and I have to fix everything again. Has anyone else experienced this issue, and what was your resolution to the problem?
I figured out what the problem was. On my first View Controller, I had some labels that had somehow become set to a width of zero. After I fixed them, and embedded them in a stack, the problem resolved itself. I have no idea how this screwed up several other view controllers; however, fingers crossed, the corruption hasn't happened again since I fixed it.
Well apparently there is just some display bug in Xcode. When I click on a new size class and click back, the elements are restored to their correct size. This was maddening, but apparently it's working fine now if I do this quick fix.

iOS UI elements are invisible

I work on a project for few days. All worked great until today. I've added few elements to view just like normal today. But when I launch app on device I can't see them. They are there: size classes works ok, everything is on right place. I can even touch UISegmentedControl and pick item on UIPickerView that makes the Picker View noise. But they are invisible - I can see only older elements.
I can't even tell where is the problem, because new elemts have THE SAME setting as olders. Methods like [_someElement setHidden:NO] does nothing.
Can you help me please?
Edit: they are visible in IB Preview
probably bug with cache, try to:
-delete all data from DerivedData folder
/Users/%user name%/Library/Developer/Xcode/DerivedData
-manually remove application from device/simulator
rebuild application
Thank you, I solved it after few hours, when I was focusing on another problem.
AVFoundatuon preview layer hide those elements. Simple solution is to bring them to the top as subviews.
Thank you.

Blank white screen every time I run the iOS simulator

I've created a simple program where a person can log in with a username and password. Every time I attempt to run it, I simply get a blank white screen. I tried changing the background color to a dark green one in hope that it would change it in the simulator too, however I get the same white screen.
This problem arose before I got that breakpoint error, it first started happening randomly in a previous project, which makes me think something is wrong with my xcode.
See my screenshot below:
I had this same issue where I saw the app briefly, and then it went to solid white. It pays to make sure you edit the "Main" storyboard, not the "LaunchScreen" storyboard when following tutorials...
Maybe my embarrassing mistake will help someone else...
There are a few things to keep in mind here that could be causing thsi error. Firstly, as some of the comments have pointed out the first thing you should do is delete the breakpoints from all the lines. To do that, you have 3 choices:
Press the blue arrow just above the console, that you can see here:This will disable all your breakpoints, so if you are using them intentionally somewhere else, don't use this method.
You can press each breakpoint individually, simply pressing the arrows next to your code on the left-hand side. This will disable the specific breakpoint. They then will become more greyish, like the one below #IBAction func loginTapped()
Last but not least, in my opinion the best method, simply grab the blue arrow and drag it to the right or left. This will make a cloud and zishing noise, symbolizing the deletion of the breakpoint.
Once this is out of the way, let's take the second most important step. Check that the loginViewController is the initial View Controller, so that it's the first page that's displayed. To do that, simply open the file inspector on the right-hand side. You can activate it by pressing the third button here:
Then, select your viewController,, so that it light up's blue like seen below:
Then, on the 3rd tab of The file inspector, by pressing the 4th tab that looks like an arrow pointing down. Now you should see a checkbox saying "isInitialViewController". Tick that so that you get through immediately to this screen. It should look like this down below:
Lastly, I'd like to point you to some more things you should check that could cause this error:
You never actually create the UITextField and UIButton
You have a different view covering your viewController(eg, webView or view)
You are on the wrong storyboard, this could happen but is unlikely.
If all this fails, try restarting Xcode, the simulator and running again by pressing the Play Sign or CMD-R.
Hope that helps, Julian
I don't know who this might help but I solved my problem by reinstalling CocoaPods and installing everything with pod install and pod update. I reset my mac some time back because it's storage was full and I forgot CocoaPods and all the pods uninstalled. Reinstalled them and now I'm back.
Edit:
It didn't fix it but I am getting closer.
It happened to me after exiting Xcode and closing the simulator the simulator device setting changed to the default ipod, when I realized this I changed it back to iPhone11. I got the white background but after waiting a few minutes it just worked.

Resize Panes in Xcode

The resizing of the different Panes/Windows in Xcode often stops working and I have to toggle hide or show in order to reactivate it.
If you look at the images below, sometime I cannot get a resize cursor as shown in the second image.
I have been patient. I keep expecting the next version of XCode to solve this bug or maybe the next OSx.
I am now on Xcode 7.1.1 and OSx 10.11.1.
Am I the only one who has the recurrent bug ? Is there a fix anyone knows of ? I always click on one of the toggles switches in the toolbars and it fixes it but I cannot stop it reoccurring.
In my experience this has never caused Xcode to freeze, but also you can resize the panes regardless of whether the cursor changes or not. Just point to that area and drag it - it will follow.

Resources