翠鸟tvOS(悬停缩放)

时间:2020-10-11 03:43:40

标签: swiftui kingfisher

我想知道如何删除左侧和右侧默认的白色条。 相反,我希望它使图像向前缩放。

enter image description here enter image description here

如您所见,图像似乎带有白色背景。相反,a希望使图像跳出(缩小)给用户。

  ScrollView(.horizontal, showsIndicators: false) {
                                            HStack(alignment: .bottom, spacing: 10) {
                                                ForEach(self.stations) { station in
                                                    //return
                                                   Button(action: {
                                                  //  Analytics.logEvent("Station_Change",parameters: [
                                                    //    "name": station.name
                                                    //])
                                                    AdStichrApi.station = station.name
                                                    MusicPlayer.shared.startBackgroundMusic(url:station.listenlive, type: "radio")
                                                   // self.showingDetail.toggle()
                                                   }) {
                                                    
                                                    KFImage(URL(string: station.imageurl)!)
                                                        .resizable()
                                                        .renderingMode(.original)
                                                        .frame(width:geo.size.width / 4, height:geo.size.width / 4)
                                                  
                                                    .sheet(isPresented: self.$showingDetail) {
                                                       // MediaPlayerView()
                                                            
                                                    }
                                                }
                                                   
                                                
                                            }
                                                
                                            }.frame(height: geo.size.width / 4)
                        }.frame(height: geo.size.width / 4)

0 个答案:

没有答案