I made a custom nav bar. and added a scroll view below it. The problem I am getting is when I scroll down, the data inside scroll view comes over the navigation bar. Here is the screenshot:
My code is:
struct NewsfeedView: View {
var newsfeedModel: [NewsFeedData]
var body: some View {
VStack {
CustomNavBar(navTitle: "Newsfeed")
ScrollView {
LazyVStack{
ForEach(newsfeedModel) { modelData in
NewsFeedTableViewCell(newsFedd: modelData)
}
}
}
}.ignoresSafeArea()
}
}
Does anyone knows what is the issue?
If it's undesired then just clip it, like
ScrollView {
// .. content here
}
.clipped() // << here !!