Post

Replies

Boosts

Views

Activity

Reply to `AVPlayerView` becomes not interactive in trimming mode.
I finally figure out the problem. It seems that applying .clipShape(...) on RecorderPlayerView will cause the problem. Just remove the line .clipShape(RoundedRectangle(cornerRadius: 8)) will solve this problem. RecorderPlayerView(playerView: playerViewModel.playerView) // .clipShape(RoundedRectangle(cornerRadius: 8)) <-- remove this line .onAppear { ... } Maybe there are some bugs in .clipShape and AVPlayerView in trimming mode.
Aug ’22
Reply to Enum with a description
Just try enum DayOfTheWeek: String, CaseIterable, Identifiable{ var id: String {self.rawValue} case monday = "Monday" case tuesday = "Tuesday" var description: String { switch self { case .monday: return "it's a great day to have a coffee" case .tuesday: return "..." } } } // it's a great day to have a coffee let mondayDescription: String = DayOfTheWeek.monday.description
Dec ’22