-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4adcfed
commit a325f56
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
+15.3 KB
(120%)
...proj/project.xcworkspace/xcuserdata/tahatesser.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
SwiftUIPlayground/Samples/LayoutAdjustments/SafeAreaInsetSample.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// SafeAreaInsetSample.swift | ||
// SwiftUIPlayground | ||
// | ||
// Created by Taha Tesser on 27.09.2024. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct SafeAreaInsetSample: View { | ||
var body: some View { | ||
NavigationStack { | ||
List { | ||
Text("One") | ||
Text("Two") | ||
Text("Three") | ||
} | ||
.navigationTitle("Safe Area Inset") | ||
.navigationBarTitleDisplayMode(.inline) | ||
.safeAreaInset(edge: .top, spacing: 0) { | ||
HStack { | ||
Spacer() // Pushes the Menu to the trailing end | ||
|
||
Menu { | ||
Button("Set In Point", action: {}) | ||
Button("Set Out Point", action: {}) | ||
} label: { | ||
Label("Editing", systemImage: "ellipsis.circle") | ||
.font(.headline) | ||
.foregroundColor(.blue) | ||
} | ||
} | ||
.padding(.horizontal) | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
SafeAreaInsetSample() | ||
} |