UICollectionView error with no CollectionView in iOS7 - uikit

My app crashes somewhere with the error "UICollectionView dataSource is not set".
This happens only on iOS7 when performing this method:
[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:]
My problem is I DO NOT have a UICollectionView inside my project!
What could be the problem?
I could not reproduce the problem myself.
I just get reports on these crashes via Crashlytics.

Related

Xcode Error: Could not instantiate class named _UIScrollViewLayoutGuide

I am running my Xcode project (Xcode 11) on an iPhone 4S running iOS 9 and I am getting the following error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
I have tried looking up solutions to this error but could not find any. My code has installed all constraints and am suspecting it is because I am using the Interface Builder to create the scroll view.
What is odd is that other scroll views in the app are working fine, but this one keeps giving me this error… Any way to solve it?
It seems that I have found an answer! I am unsure why Xcode did not flag the error in the first place. With the new Xcode support for iOS 13, ScrollView Content Layout Guides are automatically enabled. In iOS versions below iOS 11, there is no Content Layout Guide attribute.
I disabled the Content Layout Guides by selecting the Scroll View, going to the Size Inspector and deselecting 'Content Layout Guides' at the bottom of the first section.
This fixed my issue!

Xamarin iOs Build failed : Storyboards

It has been a month that I can't build my Xamarin iOs project. This seemed to have started after I updated to the new Xcode for the free provisioning. Since then, I tried finding a solution to this problem, but I haven't seem to find one.
When building the application, Xamarin Studio prompt me with an error that only indicates the name of my storyboard without any description. (The build action used for my storyboard is InterfaceDefinition which is the default one I guess)
Xamarin Studio also opens the Storyboard when the build failed.
I tried to open the storyboard in Xcode and everything went fine. So I really don't understand what is happening with my storyboards.
I even tried to open it with Visual Studio and the build failed but with no error.
Any help would be welcomed !
Thank you in advance :)
I got the same error.
I found the problem. In my storyboard, I added a tableview with static cell. => this caused the error.
Static table views are only valid when embedded in UITableViewController instances
Just changed my tableview to dynamic Prototype and it worked.
One of the cause can be using same storyboard identifier for two view controllers. I faced this error and was able to detect it by opening storyboard file in Xcode.
Having the same StoryBoard.Id property set on different UIViewControllers is another cause.

Xcode 6.3.1 Simulator UI Errors

Since updating to Xcode 6.3.1, my Simulator isn't rendering my UI elements consistently with autolayout.
My detailViews render the same IB layout inconsistently, with one view truncated while the other view is fine. Both are properly constrained. This only happened after installing the new update.
Has anyone else encountered this problem?
Thanks
When you say "simulator", are you talking about the iOS device simulator, or the Preview Assistant?
Does this issue reproduce on device?
Can you post a screenshot showing all of your constraints for the affected view?

UIImage View does not display in launch storyboard iOS 8

I am trying to create a launch storyboard for an iOS 8.1 app using Xcode 6.1.1
If i create a ViewController, add a view and add a label to that view, it all seems to work fine on actual devices. But when I add a UIImageView with an image file, the image never appears on the device.
Has anyone else had this problem? Has anyone else been successful just having a simple UIImage in a launch storyboard? I must be missing something.
FGRios
Just use image file added to project, not from *.xcassets
I had exactly the same issue. Removing the app from my phone, reboot the phone, and reinstalling the app fixed it for me.

Could not instantiate class named UIRefreshControl Xcode

I am building a RSS feed on a tableview. When i run the app, on my iPhone could run smoothly while in ipad, it crashed and showed "Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIRefreshControl'"
I tried to run the app on my ipad simulator, it also could run smoothly. May I know what is the problem for that?
Thanks
UIRefreshControl only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl, because UIRefreshControl did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl", it doesn't know what to do with it, and it crashes.
In your storyboard, click on the tableview and go to the Attribute Inspector. Under the section "TableView Controller" there is a selection window for "Refreshing" that can be set to disabled. When I built for my iPad-1, running iOS 5.1 I got an empty tableView instead of the error, 'Could not instantiate class named UIRefreshControl'. This was to be expected since I haven't populated the device with files to select, yet.

Resources