HomeiOS Developmentios - Toolbar positioned as backside bar doesn't present line just like...

ios – Toolbar positioned as backside bar doesn’t present line just like high bar


I’m opening a view as fullScreenCover and including high and backside bar to it. I’m utilizing iOS 16.4

Once I add a toolbar at high, iOS routinely provides a horizontal divider line however doesn’t do the identical for backside bar. It would not even permit me so as to add an overlay so I can create a rectangle round backside bar which is able to present the divider line. How can I add a horizontal divider line for backside bar (just like one marked with arrow within the connected screenshot)?

Word: I’ve an excessive amount of of code so simply including code inside ‘fullScreenCover’ modifier. However all of the toolbar code is on this snippet. If extra code is required, please let me know.

Edit: If a line can’t be added, then how do I add a background colour. As talked about, every time I attempt to add an overlay or every other factor, I’m seeing errors.

Code:

.fullScreenCover(isPresented: $showAttachment) {
NavigationStack {
    CustomView.
        .navigationBarTitleDisplayMode(.inline)
        .toolbar {
            ToolbarItem(placement: .confirmationAction) {
                Button {
                    self.showAttachment = false
                    self.showAttachmentHeader = false
                }
            label: {
                Textual content(Strings.executed).font(.physique.daring())
            }
                
            }

            ToolbarItemGroup(placement: .bottomBar) {
                // TODO: Add a button to "share picture"
                Spacer()
                VStack(alignment: .heart) {
                    Textual content("6 Attachments")
                    .font(Font.customized("SF Professional Textual content", measurement: 12))
                    .multilineTextAlignment(.heart)
                    .foregroundColor(.black)

                    Textual content("1 of 6")
                    .font(Font.customized("SF Professional Textual content", measurement: 11))
                    .kerning(0.066)
                    .multilineTextAlignment(.heart)
                    .foregroundColor(Colour(crimson: 0.24, inexperienced: 0.24, blue: 0.26).opacity(0.6))
                }
                Spacer()
            }
        }
        .toolbarBackground(Colour.lightGray, for: .navigationBar)
        .toolbarBackground(.seen, for: .navigationBar)
        .toolbar(.seen, for: .navigationBar)
        .toolbarBackground(Colour.lightGray, for: .bottomBar)
        .toolbarBackground(.seen, for: .bottomBar)
        .toolbar(.seen, for: .bottomBar)
}
}

enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments