PaoloCuscela / Cards

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

About the CardDelegate #44

Closed oldjerry closed 6 years ago

oldjerry commented 6 years ago

Hello,I found something when any card content view is presented:

cardIsShowingDetail and cardIsHidingDetail called twice; others called once;

why that? Thanks a lot.

the codes:

extension MyViewController: CardDelegate {

func cardIsShowingDetail(card: Card) {
    NSLog("DetailView Is Showing")
}

func cardIsHidingDetail(card: Card) { 
    NSLog("DetailView Is Hiding")
}

func cardWillShowDetailView(card: Card) {
    NSLog("DetailView Will Show")
}

func cardDidShowDetailView(card: Card) {
    NSLog("DetailView Did Show")
}

func cardWillCloseDetailView(card: Card) {
    NSLog("DetailView Will Close")
}

func cardDidCloseDetailView(card: Card) {
    NSLog("DetailView Did Close")
}

}

the results:

Demo[35995:1561170] DetailView Will Show (0.0, 0.0, 375.0, 812.0) 2018-03-21 13:30:52.099161+0800 Demo[35995:1561170] DetailView Is Showing (0.0, 0.0, 375.0, 812.0) 2018-03-21 13:30:52.425720+0800 Demo[35995:1561170] DetailView Is Showing (0.0, 0.0, 375.0, 812.0) 2018-03-21 13:30:52.728209+0800 Demo[35995:1561170] DetailView Did Show 2018-03-21 13:30:54.745387+0800 Demo[35995:1561170] DetailView Will Close 2018-03-21 13:30:54.761772+0800 Demo[35995:1561170] DetailView Is Hiding 2018-03-21 13:30:55.079228+0800 Demo[35995:1561170] DetailView Is Hiding 2018-03-21 13:30:55.380317+0800 Demo[35995:1561170] DetailView Did Close

PaoloCuscela commented 6 years ago

Thanks a lot, fixed that :D

oldjerry commented 6 years ago

Hi, I updated to 1.3.2, but "DetailView Is Showing" and "DetailView Is Hiding" still run twice. pls check it again.

P.S Thanks for your awesome framework