This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5429927-beginning-collection-views/lessons/30
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5429927-beginning-collection-views/lessons/30
@pasanpr, when I select more than 3 courses in section fatal error occurs:
***** Assertion failure in -[_UIDiffableDataSourceUpdate initWithIdentifiers:sectionIdentifiers:action:desinationIdentifier:relativePosition:destinationIsSection:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3901.4.2/_UIDiffableDataSource.m:1417**
2020-01-14 02:13:26.802124+0500 RWLibrary[12794:3641984] *** Terminating app due to uncaught exception âNSInternalInconsistencyExceptionâ, reason: âFatal: supplied identifiers are not unique.â
Also both in your code and in mine lesson in queue list does not come first after pressing play button - it comes second.
Please help to find out whatâs happening.
There is an issue with the way the gradient is done. Once the app is loaded and you press the Home button and then go back into the app, there seems to be some kind of cumulative effect.
BEFORE
(I was not allowed to post more than one image. The first one looks exactly as expected).
AFTER
I first noticed the effect when scrolling around but it is highly recreatable just leaving and going back in.
@andreysvx Apologies on the delay in getting back to you I somehow missed this! Were you able to solve this issue?
Thanks for uncovering this! The issue occurs because in GradientView.swift
the gradient is being created and applied inside layoutSubviews()
, which is called repeatedly when the app comes into foreground (or when the device is rotated).
The fix is fairly simple. On line 43 in GradientView.swift
an instance of CAGradientLayer()
is created. If you move this line of code outside the method to create a reference to the gradient the issue should be resolved!
No problem) Unfortunately I have not managed to solve nor this neither other issues.=(
I have faced this issue
âNSInternalInconsistencyExceptionâ, reason: 'Fatal: supplied identifiers are not unique.
After confirming Identifiable it is resolved
And resolved via below link:
Please guide me if it is wrongâŠ
Your solution works so great job at that Thereâs most likely a missing identifier in the starter file thatâs causing this issue. I will double check!
Yes, still have issues with it =(
I guess url in Video may repeat â identifier(we use ăurlăin Video.swift) not unique
create an identifier using uuid solve this
//Video.swift
let identifier = UUID().uuidString
static func ==(lhs: Video, rhs: Video) -> Bool {
return lhs.identifier == rhs.identifier
}