PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.2k stars 274 forks source link

Value of type 'CardHighlight?' has no member 'detailView' #97

Closed bradenboothby closed 5 years ago

bradenboothby commented 5 years ago

Does anyone know how to fix this error?

screen shot 2019-01-16 at 9 24 28 pm
h-elbeheiry commented 5 years ago

I found a solution for that:

first write this line: let detailVC = storyboard?.instantiateViewController(withIdentifier: "CardContent")

then this one instead of the detailView: card.shouldPresent(detailVC, from: self)

This worked for me. Hope it helps.

PaoloCuscela commented 5 years ago

Al is right. detailView is a property of the ViewController managed by the Card class. Both are not accessible directly anyway, you should use card.shouldPresent(.class, from: self) to set you view controller.

gangfang commented 5 years ago

Hi @PaoloCuscela thanks for the awesome library!

Just a friendly suggestion here, you may update the wiki because in it card.detailView = detailVC?.view is still used and the content there seems not up to date.

Thanks!