Answers for "swiftui text alignment"

5

center text swiftui

.multilineTextAlignment(.center)
Posted by: Guest on March-15-2020
0

change individual element alignment swiftui

struct ContentView: View {
    var body: some View {
        HStack(alignment: .bottom) {
            Image(systemName: "zzz")
                .alignmentGuide(.bottom) { d in d[.bottom] + 8 }
            Text("Sleep")
        }
    }
}
Posted by: Guest on April-14-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language