Post

Replies

Boosts

Views

Activity

building a camera app in Swiftui
(sorry for my bad english I'm French) Hello, for about few days I'm trying to set up a camera session and capture video and save them in my app in SWIFTUI. I read that there's no way in SWIFTUI to do that and I have to use swift method. I find none tutorial who do this with swiftui (only tutorial to set up the camera without doing anything with this camera) Is there someone who can guide me some tip off to do this ?
0
0
627
Mar ’21
ScrollViewreader multiple ScrollTo in multiple Foreach
Hello I have an issue, I can't make many .scrollTo() in my code: (I'm French sorry for my bad english) else if index == 1 { withAnimation {                 value.scrollTo(topID)          } } my issue is in value.scrollTo(topID) I tried to implement 6 of them in 3 differents foreach and The compiler doesn't compile but if I remove the value.scrollTo(topID) of one of the Foreach it compile else if wichView.SelectedView == 5 {                 HStack {                   ForEach(1..6) { index in                     Spacer()                     Button(action: {                       if index == 3 {                         withAnimation() {                           wichView.SelectedView = 1                           wichView.carouselLocation = 0                         }                         value.scrollTo(topID)                       }                       else if index == 1 {                         withAnimation {                           value.scrollTo(topID)                         }                       }                     },                     label: {                       Image("IPPV5_TABBITEM\(index)")                         .resizable()                         .aspectRatio(contentMode: .fit)                         .frame(width: 40,                             height: 40)                     })                   }                   Spacer()                 }                 .padding(.bottom, -10)                 .frame(width: size.width,                     height: 35)               }               else if wichView.SelectedView == 6 {                 HStack(spacing: size.width/3 - 10) {                   Button(action: {                     withAnimation {                       value.scrollTo(topID)                     }                   },                   label: {                     Image("IPPV6-TABITEM1")                       .resizable()                       .aspectRatio(contentMode: .fit)                       .frame(width: 40,                           height: 40)                                         })                                       Button(action: {                     wichView.SelectedView = 1                     wichView.carouselLocation = 0                     value.scrollTo(topID)                   },                   label: {                     Image("IPPV6-TABITEM2")                       .resizable()                       .aspectRatio(contentMode: .fit)                       .frame(width: 40,                           height: 40)                   })                   Spacer()                 }                 .padding(.bottom, -10)                 .frame(width: size.width - 40,                     height: 35)               }               else if wichView.SelectedView == 8 {                 IPPV8TabItem               }               else if wichView.SelectedView == 9 {                 HStack {                   ForEach(1..6) { index in                     Spacer()                     Button(action: {                       if index == 3 {                         withAnimation {                           wichView.SelectedView = 1                         }                         wichView.carouselLocation = 0 //                        withAnimation { //                          value.scrollTo(topID) //                        }                       }                       else if index == 1 { //                        withAnimation { //                          value.scrollTo(topID) //                        }                       }                     },                     label: {                       Image("IPPV9-\(index)")                         .resizable()                         .aspectRatio(contentMode: .fit)                     })                   }                   Spacer()                 }                 .frame(width: size.width,                     height: 40)               } This is Part of my code (all is in a ScrollView who is in a Scrollviewreader who is in a Vstack who is in a Zstack) This code work fine and compile because I commented the .scrollTo() of one of the Foreach if I decomment it will not compile. Any help please?
1
0
721
Mar ’21
Unable to boot device because it cannot be located on disk.
Hello I'm posting here because I'm desperate, I followed many instructions to delete and reinstall Xcode. here the details of the error: Details Unable to boot device because it cannot be located on disk. Domain: NSPOSIXErrorDomain Code: 2 Failure Reason: The device's data is no longer present at /Users/bilelhattay/Library/Developer/CoreSimulator/Devices/56569099-E54F-4B33-B53D-13C8729EDC48/data. Recovery Suggestion: Use the device manager in Xcode or the simctl command line tool to either delete the device properly or erase contents and settings. - System Information macOS Version 11.2 (Build 20D64) Xcode 12.4 (17801) (Build 12D4e) Timestamp: 2021-02-04T05:41:53+01:00 __________________________________________________ I hope someone understand what happen
1
0
1.6k
Feb ’21