Post

Replies

Boosts

Views

Activity

About face-to-face sessions
If I am a member of the Apple Developer Program, can I participate in the in-person Apple Vision Pro Developer Lab under "Meet With Apple Experts " regardless of my age or app release history? I am currently a high school student and have a little experience with visionOS development. I also have knowledge of iOS development and have worked on several apps. I am not currently in the Apple Developer Program yet, but would like to be if possible.
0
0
311
Feb ’24
Drag&Drop doesn't work
Im making an app that uses drag&drop but, it doesn't work. This is made with Swift Playground. If you can find a solution, please let me know. Here is the code. //MARK: Drop Area @ViewBuilder func DropAera()->some View{ VStack(spacing: 12){ ForEach($rows,id:\.self){$row in HStack(spacing: 10){ ForEach($row){$item in Text(item.value) .font(.system(size: item.fontSize)) .padding(.vertical,5) .padding(.horizontal,item.padding) .opacity(item.isShowing ? 1 : 0) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .fill(item.isShowing ? .clear : .gray.opacity(0.25)) } .background{ // If Item is Dropped into Correct Plase RoundedRectangle(cornerRadius: 6, style: .continuous) .stroke(.gray) .opacity(item.isShowing ? 1 : 0) } // MARK: Adding Drop Operation // MARK: Adding Drag Drop Operation .onDrop(of: [.url], isTargeted: .constant(false)) { providers in if let first = providers.first{ let _ = first.loadObject(ofClass: URL.self) { value,error in guard let url = value else{return} if item.id == "\(url)"{ droppedCount += 1 let progress = (droppedCount / CGFloat(characters.count)) withAnimation{ item.isShowing = true updateShuffledArray(character: item) self.progress = progress } } else{ //Animating When Wrong text animateView() } } } return false } } } if rows.last != row{ Divider() } } } } @ViewBuilder func DragArea()->some View{ VStack(spacing: 12){ ForEach(shuffledRows,id: \.self){row in HStack(spacing: 10){ ForEach(row){item in Text(item.value) .font(.system(size: item.fontSize)) .padding(.vertical,5) .padding(.horizontal,item.padding) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .stroke(.gray) } // MARK: Adding Drag Drop Operation .onDrag{ // Returning ID to find whitch Item is Moving return .init(contentsOf: URL(string: item.id))! } .opacity(item.isShowing ? 0 : 1) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .fill(item.isShowing ? .gray.opacity(0.25) : .clear) } } } if shuffledRows.last != row{ Divider() } } } }
1
0
695
Feb ’24