« Exporter une image dans la librairie Photo » : différence entre les versions
De WikiSwift
Aucun résumé des modifications |
|||
Ligne 1 : | Ligne 1 : | ||
<syntaxhighlight lang="swift" line="1" start="1"> | |||
import PhotosUI | |||
import SwiftUI | |||
//import SwiftUIViewToImage | |||
struct ImageView: View { | |||
'''Page en cours de création !''' | |||
// MARK: Settings | |||
@Binding var roundedImage: Bool | |||
@Binding var showText: Bool | |||
@Binding var contentText: String | |||
@Binding var showShadow: Bool | |||
@Binding var colorPicker : Color | |||
@Binding var sliderValueX: Double | |||
@Binding var sliderValueY: Double | |||
@Binding var selectImage : String | |||
@Binding var pickerImage : PhotosPickerItem? | |||
@Binding var width: CGFloat | |||
@Binding var height: CGFloat | |||
// MARK: Designs | |||
var body: some View { | |||
// MARK: Sizing Control of Screen Size | |||
GeometryReader { geometry in | |||
VStack { | |||
let imageView = ImageMeme( | |||
roundedImage: $roundedImage, | |||
showText: $showText, | |||
contentText: $contentText, | |||
showShadow: $showShadow, | |||
colorPicker: $colorPicker, | |||
sliderValueX: $sliderValueX, | |||
sliderValueY: $sliderValueY, | |||
selectImage: $selectImage, | |||
width: .constant(geometry.size.width * 0.7), | |||
height: .constant(geometry.size.height * 0.7) | |||
) | |||
</syntaxhighlight>'''Page en cours de création !''' |
Dernière version du 24 août 2024 à 14:15
import PhotosUI
import SwiftUI
//import SwiftUIViewToImage
struct ImageView: View {
// MARK: Settings
@Binding var roundedImage: Bool
@Binding var showText: Bool
@Binding var contentText: String
@Binding var showShadow: Bool
@Binding var colorPicker : Color
@Binding var sliderValueX: Double
@Binding var sliderValueY: Double
@Binding var selectImage : String
@Binding var pickerImage : PhotosPickerItem?
@Binding var width: CGFloat
@Binding var height: CGFloat
// MARK: Designs
var body: some View {
// MARK: Sizing Control of Screen Size
GeometryReader { geometry in
VStack {
let imageView = ImageMeme(
roundedImage: $roundedImage,
showText: $showText,
contentText: $contentText,
showShadow: $showShadow,
colorPicker: $colorPicker,
sliderValueX: $sliderValueX,
sliderValueY: $sliderValueY,
selectImage: $selectImage,
width: .constant(geometry.size.width * 0.7),
height: .constant(geometry.size.height * 0.7)
)
Page en cours de création !