mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-29 05:31:59 +02:00
Minimum changes for Xcode 11 beta 5
This commit is contained in:
@@ -11,6 +11,7 @@ import AVKit
|
||||
import CoreLocation
|
||||
|
||||
struct ContentView : View {
|
||||
@State private var isCameraPresented = false
|
||||
var instaPhotos: [InstaPhoto]
|
||||
|
||||
var body: some View {
|
||||
@@ -19,7 +20,17 @@ struct ContentView : View {
|
||||
ForEach(instaPhotos, id: \.id) {
|
||||
ImageCell(photo: $0)
|
||||
}
|
||||
}.navigationBarTitle("WWDC").navigationBarItems(trailing: PresentationLink("Camera", destination: CameraView()))
|
||||
}.navigationBarTitle("WWDC").navigationBarItems(trailing:
|
||||
Button(action: {
|
||||
self.isCameraPresented = true
|
||||
}) {
|
||||
Image(systemName: "person.crop.circle")
|
||||
.imageScale(.large)
|
||||
.accessibility(label: Text("User Profile"))
|
||||
.padding()
|
||||
}
|
||||
).sheet(isPresented: $isCameraPresented,
|
||||
content: { CameraView() })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user