ALL BUSINESS
COMIDA
DIRECTORIES
EDUCATIONAL
ENTERTAINMENT
FASHION TIPS
FINER THINGS
FREE CREATOR TOOLS
HEALTH
MARKETPLACE
MEMBER's ONLY
MONEY MATTER$
MOTIVATIONAL
NEWS & WEATHER
TECHNOLOGIA
TELEVISION NETWORKS
USA VOTES 2024
VIDEOS
INVESTOR RELATIONS
IN DEVELOPMENT
Posted by - Latinos MediaSyndication -
on - Mar 30 -
Filed in - Technology -
-
280 Views - 0 Comments - 0 Likes - 0 Reviews
Consider following simplified code for an element that can be dragged
HStack { Icon(icon: .iconDrag) Text("Title") Spacer() } .padding(16) .onDrag { return NSItemProvider(object: id.uuidString as NSString) }
This results in behavior below, where once drag starts preview element is shown, but it is a fraction of a size from original element and has transparency.
I tried adding preview : {} to onDrag with same original element duplicate, but it's size is still inaccurate and it has transparency. Is there a way to extend a preview somehow (say with uikit) so that it remains exactly the same as original element? I believe there is a maximum width of preview element at which point it starts shrinking down perhaps?