I'm in XCode 6.1.1 and iOS 8.x
As pictured, I have a map, and a tableview that shows details about a particular property on the map. There is also a toolbar along the top (blurred) that has up/down arrows on it to move to the next property, which basically rebuilds the tableview and refreshes the screen.
Well notice the weird square that's about 1.5" x 1.5" in the center of the screen.
That square quickly appears and disappears in the center of the screen when the screen is refreshed moving from property to property.
I have no idea where that view is coming from.
Is there an instrument in Instruments to catch this view in the act so I can figure out what it is and where it's coming from.
I've used the Time Profiler, but I don't recognize anything in the backtraces that helps me figure out where this mystery view is coming from, and I don't believe it's being created by any of the code in my app, which makes it more troublesome.
If this was your app, how would you figure out where this mystery view is coming from?
I found the answer within an Instruments time profile backtrace... turned out there was a third party activity indicator buried deep in some code.
Dooh!!
Instruments to the rescue once again.
Related
I'm running into a very strange issue with 3D Touch previewing in my app. As you press into a cell to show a preview, a view seems to grow out of the top left corner, until it's about to show the preview view controller, at which point it's the full size of the view controller.
Here's a video of the behavior
I haven't been able to replicate in any apps I've created from scratch; however, creating a new tableview and view controller in the same app it still does it:
Video
I know this isn't a lot to go on, but I've exhausted my debugging knowledge. I'm not getting auto layout errors, when I debug the view hierarchy the view just isn't there. I'm hoping someone has experienced this and knows how to fix it.
Thanks!
It took me a while to hunt this bug down. Turns out it's caused (in my case) by https://github.com/icanzilb/EasyAnimation. When I remove the library the bug is gone.
Cheers!
Edit: As it happens it's documented here: https://github.com/icanzilb/EasyAnimation/issues/14
Upvoters: can you let me know if you've seen this problem as well?
The issue I'm seeing occurs roughly every 1 in 15 times when I try to modally launch a view controller from a button on a certain scene.
This is done with iOS 9.2.1 and XCode 7.2, though it is not clear which versions it happens on. It's not easy to change the iOS version down.
The symptoms are as follows:
The destination view controller is not visible on the phone. Instead, the top bar (the one with the carrier) goes black, and sometimes it flickers so the whole screen is completely black. The launching view controller is visible, but not responsive.
When this happens, I go to the XCode screen and do view debugging. Remarkably, this shows the destination screen, almost as it's supposed to look. The only difference is that one of the views has not done its drawRect, and one of the other views looks all speckled. But of course it does not at all correspond to what the phone is showing.
The cancel button on the destination screen seems to still work, because when I press where it's supposed to be, the app continues to function. If I try to relaunch the screen with the button, it again doesn't work though. So once this has happened, the screen has stopped working for that session and the app needs to be killed and restarted.
There are not many hints, but this information may help:
There's 3 scrollviews containing views on the destination screen. All three child views have their own drawRect. It turns out one of the drawRects is not called when the error occurs, resulting in the grey background being shown. The speckled view does run, but I have no clue why it looks like that in view debugging.
No warnings in XCode. Nothing about NSLayout constraints or presentations overlapping.
Two fields are set on the destination view controller on the prepareForSegue function.
The segue is launched from the times button by way of the storyboard. There's no missing or extra outlet, and it is named correctly for the prepare function to catch it.
The issue is sporadic, but will reliably occur if you launch/cancel many times in a row.
Here are the screen grabs. I won't show you the black screen. It's just black with the carrier and the time.
I've solved it. Checking the memory usage turned out to be quite useful.
The grey area was supposed to be filled by a large background with lines drawn. It turns out the naive implementation of drawBackground causes the memory size to balloon to over 200MB. I replaced it with a CSTiledLayer, and now it takes a few MB instead.
I've inherited a partially finished app that I need to finish. Unfortunately there seems to be a bug involving the display of the keyboard. The bug does not occur when opening the app on my iPhone, but it does appear in the simulator, and I'm being told it also appears on iPad.
When selecting a text field on the affected , the keyboard background rolls up in the right spot. However, the keyboard buttons appear near the top of the screen, and then rolls up until they can no longer be seen. If another text field is selected, the keyboard buttons appear so that they are visible, but still at the top of the screen, instead of down on the keyboard background. The problem can be seen in this video:
https://vid.me/0bEs
I've searched through the code, and I can't find anything overt that should cause this behaviour. Any ideas would be appreciated.
Have you check in appdelegate or in view controller that is there any observer with selector method. I generally face such issue while working on some other person's code.
Just search in through out project UIKeyboardWillShowNotification, UIKeyboardDidChangeFrameNotification, UIKeyboardDidShowNotification.
Hope you will get something so we can solve this riddle.
Has anyone ever had this issue:
When you slide your finger from the bottom of your iOS screen to the top, it shows the control center - and then you swipe your finger down to get rid of it, but now when you try to use your app - a lot of the dynamic content is completely broken.
After pressing the home button and coming back to the app, everything is back to normal.
It appears the Control Center breaks my dynamic code - which is basically just a UIWebView that I'm assuming is not refreshing properly.
Does this have something to do with the "app entering the background" and "coming back to foreground"... or is there some sort of event where I can track what's going on?
This is a very strange issue.
It seems I was improperly using "applicationWillResignActive" when I really wanted to use "applicationDidEnterBackground".
By making sure to use "applicationDidEnterBackground" instead of the "applicationWillResignActive", my app appears to function perfectly fine again. Viewing the Control Center or Notification Center no longer breaks my app.
Hope this helps someone else who makes a silly mistake.
The setup
I have a UICollectionView that allows the user to page through pictures, 12 to a page. There are upwards of 200,000 pictures that should all be available in the app. I'm not expecting a user to scroll to page 20,000, so there's function to jump to a certain page.
The problem
In landscape orientation, paging breaks down on page 16,385. The collection no longer adjusts to the page boundary. If you go back before page 16,384, you can get it to start working again, but no page past 16,385 works.
My delegate also stops getting scrollViewDidEndDecelerating: the message when the bug shows up.
The hypothesis
Page 16,385 in landscape orientation happens to start at pixel 16,777,216 which happens to be 2^24. I think that there's something in UICollectionView or UIScrollView that breaks past 2^24.
Is this just an undocumented limit? Am I out of luck?
The example
I've uploaded a project that demonstrates the problem. Here's the relevant view controller. If you shake your iPad or the simulator, you'll be taken to page 16,384, one page before the bug shows up.
The snark
If you don't think a user should need to be able to go to page 20,000, that's cool. I don't think it's relevant to the question.
I'd say this is an undocumented limitation and would file a Radar bug report, attaching the sample project as evidence. If you are looking for an alternative method, you could try using a UIPageViewController with a collection view for each page. You can choose the swiping animation, rather than the default iBooks-esque animation, and replicate your sample project very closely.
You could just load say 10,000 pages and when the user jumps, load an appropriately different 10,000 pages.
I wonder whether you've tried using multiple sections? Is the limitation per section or for the entire CV?