- August 28, 2025
- Mins Read
Swift Package Manager is integrated within Xcode 11:
NSPhotoLibraryUsageDescription to info.plist
import SwiftUI
import PhotoLibraryPicker // Add import
struct ContentView : View {
@State var showActionSheet: Bool = false
@State var pictures = [Picture]()
var body: some View {
VStack {
Button(action: {self.showActionSheet.toggle()}) {
Image(systemName: “plus”)
.padding()
.background(Color.secondary)
.mask(Circle())
}.sheet(isPresented: self.$showActionSheet) {PhotoLibraryPicker(self.$pictures)}
List {
ForEach(pictures) { picture in
picture.toImage() // You can fix the size by default width: 100, height: 100
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
Group {
ContentView().environment(\.colorScheme, .dark)
ContentView()
}
}
}
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...