Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 12 Compatibility? #80

Open
markturnip opened this issue Jun 12, 2020 · 5 comments
Open

iOS 12 Compatibility? #80

markturnip opened this issue Jun 12, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@markturnip
Copy link

It appears there's a few issues with iOS 12.

One of which being a crash which may be related to #77.
Also some trouble with headers especially when pinning to bounds.
I can provide more details here, however should this library have support for iOS12?

@markturnip markturnip changed the title iOS 12 Compatabilty? iOS 12 Compatibility? Jun 12, 2020
@bryankeller
Copy link
Contributor

Hi @markturnip - MagazineLayout should definitely support iOS 12. Can you post an example of the issues / crashes you're seeing?

@bryankeller bryankeller self-assigned this Jul 24, 2020
@bryankeller bryankeller added the bug Something isn't working label Jul 24, 2020
@smurphy
Copy link

smurphy commented Aug 18, 2020

@markturnip I was seeing the same errors when using UICollectionView.elementKindSectionHeader kind instead of MagazineLayout.SupplementaryViewKind.sectionHeader. Is it possible that's what you experienced?

@markst
Copy link

markst commented Aug 19, 2020

@smurphy Not too sure afraid. Haven't got the time to investigate fully. I'm checking for both header kinds, so I don't think I'm sharing the same issue. Thanks but.

if [MagazineLayout.SupplementaryViewKind.sectionHeader, UICollectionView.elementKindSectionHeader].contains(kind) {
  let header = view.dequeueReusableSupplementaryView(
    ofKind: UICollectionView.elementKindSectionHeader,
    withReuseIdentifier: ScheduleHeaderView.identifier,
    for: indexPath) as! ScheduleHeaderView
  return header
Thread 1: Exception: "*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: <_UICollectionViewItemKey: 0x600000448910> Type = DV ReuseID = (null) IndexPath = (null))"

@markst
Copy link

markst commented Aug 19, 2020

My header frame just resolves to zero rect every time in iOS 11.0.1:

image

Could perhaps be something to do with implicit layout height being added:

    "<NSLayoutConstraint:0x600000282260 'UIView-Encapsulated-Layout-Height' XXXX.ScheduleHeaderView:0x7f9df5452d60.height == 0   (active)>"
)

Edit:

Or rather it looks like it's due to having used Storyboards, as all my headers are defined as UICollectionView.elementKindSectionHeader. Can't seem to redefine that, so I'd have to pull all my headers out into their own xib's and register with the appropriate header kind.

@markst
Copy link

markst commented Aug 20, 2020

Alright confirmed that it's due to having defined my headers & footers in storyboards.

I'm reluctant to do so for my entire project as I do prefer to work entirely in storyboards.

However perhaps it's my only option without being able to define custom element kind's in storyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants