Hey Paul - I'm curious, for the custom .stacked extension, is there a reason you decided to give cards less offset the closer they are to the end of the index instead of the opposite (e.g. card 0 has 0 offset)? I ask as I was working through understanding the extensions logic and felt it was a little confusing at first glance. (I'm on day 88 and trying to improve with custom modifiers! 😅) I modified it in my own project, so that I just take the position and offset it but 10. Thanks for your help! This class has been incredible. func stacked(at position: Int) -> some View { let offset = Double(position) return self.offset(y: offset * 10) } }
Hey Paul - I'm curious, for the custom .stacked extension, is there a reason you decided to give cards less offset the closer they are to the end of the index instead of the opposite (e.g. card 0 has 0 offset)? I ask as I was working through understanding the extensions logic and felt it was a little confusing at first glance. (I'm on day 88 and trying to improve with custom modifiers! 😅)
I modified it in my own project, so that I just take the position and offset it but 10. Thanks for your help! This class has been incredible.
func stacked(at position: Int) -> some View {
let offset = Double(position)
return self.offset(y: offset * 10)
}
}