Search results for

“translate scheme”

6,658 results found

Post

Replies

Boosts

Views

Activity

Reply to What is the difference between sceneView.pointOfView.transform and ARCamera.transform in ARKit?
At the end of the day, I am looking to log the camera pose (rotation and translation) during the session, and I would expect the initial position to have identity rotation and the camera center to be at the origin. How do I achieve that? And to elaborate on this question: The first transform that you receive should have its translation components (i.e. 3rd column x,y,z components) set to zero. However, you would only receive an identity rotation in this first transform if the device was perfectly aligned with all three axes of the world coordinate system, which is very unlikely to occur.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’20
Reply to x86_64 daemon won't launch
I strongly encourage you to make your daemon run natively. Daemons load early in the boot process and thus they can find themselves in a situation where they load before the Rosetta translation infrastructure is up and running. I suspect that this specific problem was caused by the macOS 12 upgrade purging your Rosetta translations, and then the system trying to load the daemon before Rosetta was available. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Creating a drag handle inside of a SwiftUI view (for draggable windows and such)
I consulted with Apple Technical Support Incident. I think that's probably the best official solution at the moment. struct WindowView: View { @State private var translation = CGSize.zero @State private var lastTranslation = CGSize.zero var body: some View { VStack { // None gesture on the child view Color.red .frame(height: 100) Spacer() } .background(.blue) .frame(width: 300, height: 300) .cornerRadius(10) // Added content shape matching child view .contentShape( Rectangle() .size(width: 300, height: 100) ) .offset( x: lastTranslation.width + translation.width, y: lastTranslation.height + translation.height ) // Moved gesture to the parent view .gesture(dragGesture) } var dragGesture: some Gesture { DragGesture() .onChanged { value in translation = value.translation } .onEnded { value in lastTranslation.width += value.translation.width lastTranslation.height += value.translation.height translation = .zero } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
I can't share full code file or project, but here is case. I had setting file in that it calls API and in response callback I have DispatchQueue.main.async block to update UI. In response I am receving on serverLangValue . If you copy and check following code with any project, you will get Command SwiftCompile failed with exit code (since this small pics of code it show file name but in atual profject it's not pointing file) . After commenting case translate (text): It will work fine let serverLangValue = // Server return value let switchEnum = translate (serverLangValue) let text = en //(or any other language code) switch switchEnum { case ABC: break case QPR: break case translate (text): break //From Xcode 16 and 15 swift compiler are file to process this case whereas older was working fine default: break } }
Oct ’24
Reply to CGAffineTransform -How to Align Video in Screen Center
If anyone has a better answer please post, I'll check and accept it Unbeknownst to me the video was in the correct position but the negative black bar space was causing the video to be appear that it was misaligned. Changing the AVMutableVideoCompositionInstruction() show the .backgroundColor show the negative black bar space issue in yellow: instruction.backgroundColor = UIColor.yellow.cgColor To fix it, I divided the finalTransform.ty in half and subtracted that from a translation-y-value, so now the code is: // ... let finalTransform = transform3.concatenating(rotateFromUpsideDown) let ty = finalTransform.ty var divided = ty/2 if divided < 0 { divided = 0 } let translation = CGAffineTransform(translationX: 0, y: -divided) let new_finalTransform = finalTransform.concatenating(translation) let transformer = AVMutableVideoCompositionLayerInstruction(assetTrack: track) transformer.setTransform(new_finalTransform, at: .zero) // ... The fix: The fix with the negative black bar space
Topic: Media Technologies SubTopic: Audio Tags:
May ’22
Reply to UIImagePickerController: Camera preview on iPhone 12 (Pro) at undefined position?
Same here. I have tried to mitigate this using cameraViewTransform and while scaling to adjust to screen works, translating does not. Have tried several ways to create the transform and I can see the transform matrix being applied using a breakpoint. However, the scaling has effect while the translating (for centring purposes o for mitigating this issue) seem to have no effect. It only happens in iphone 12; iphone 11 (on both ios 13 and 14 do not exhibit this problem). It seems to me there is a bug in UIImagePickerController implementation.
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’20
Reply to XMLDocument.xmlData(withOptions:) won't compile
Try this:let xdat: NSData = xDoc.xmlData(withOptions: Int (XMLNode.Options.nodePrettyPrint.rawValue)) as NSDataYou need to use .rawValue because XMLNode.Options is an OptionsSet and the xmlData method requires numeric options. You need Int(…) around it because the raw value is a UInt rather than an Int.You should file a bug report about this API. Either it should have translated (from the Obj-C header in the SDK) to a method that uses XMLNode.Options directly, or (if for some reason the withOptions parameter must be numeric) XMLNode.Options shouldn't be translated to an OptionsSet.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’16
Reply to Localizing Nib with NSTouchBar in it, No Strings Generated.
Tried just typing the object id in the strings file manually:objectId.customizationLabel = translation;Which is a pain, but it doesn't work (atleast not in the simulator).
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jan ’17
Reply to Setting the right height for visualize in a correct way VR180 3D video
Hello @ViewtooDev, You can make use of SpatialTrackingSession or queryDeviceAnchor(atTimestamp:) to get the translation of the device, and then you can utilize that to anchor your content. Best regards, Greg
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to What is the difference between sceneView.pointOfView.transform and ARCamera.transform in ARKit?
At the end of the day, I am looking to log the camera pose (rotation and translation) during the session, and I would expect the initial position to have identity rotation and the camera center to be at the origin. How do I achieve that? And to elaborate on this question: The first transform that you receive should have its translation components (i.e. 3rd column x,y,z components) set to zero. However, you would only receive an identity rotation in this first transform if the device was perfectly aligned with all three axes of the world coordinate system, which is very unlikely to occur.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’20
Reply to x86_64 daemon won't launch
I strongly encourage you to make your daemon run natively. Daemons load early in the boot process and thus they can find themselves in a situation where they load before the Rosetta translation infrastructure is up and running. I suspect that this specific problem was caused by the macOS 12 upgrade purging your Rosetta translations, and then the system trying to load the daemon before Rosetta was available. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to About the specifications of scan response acquisition in the background state
This question uses Google Translate. Therefore, some sentences may cause misunderstanding, so if you have any questions, please ask. I'm sorry for the trouble. Thank you in advance.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Getting a d3d error while trying to run a game with the Game porting toolkit.
thanks for reporting this issue, this is a currently unsupported translation in the Game Porting Toolkit. Please feel free to file reports to https://feedbackassistant.apple.com as well!
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Creating a drag handle inside of a SwiftUI view (for draggable windows and such)
I consulted with Apple Technical Support Incident. I think that's probably the best official solution at the moment. struct WindowView: View { @State private var translation = CGSize.zero @State private var lastTranslation = CGSize.zero var body: some View { VStack { // None gesture on the child view Color.red .frame(height: 100) Spacer() } .background(.blue) .frame(width: 300, height: 300) .cornerRadius(10) // Added content shape matching child view .contentShape( Rectangle() .size(width: 300, height: 100) ) .offset( x: lastTranslation.width + translation.width, y: lastTranslation.height + translation.height ) // Moved gesture to the parent view .gesture(dragGesture) } var dragGesture: some Gesture { DragGesture() .onChanged { value in translation = value.translation } .onEnded { value in lastTranslation.width += value.translation.width lastTranslation.height += value.translation.height translation = .zero } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Command SwiftCompile failed with a nonzero exit code. in xocde 16 and 15 where as it was working fine in xcode 14.3
I can't share full code file or project, but here is case. I had setting file in that it calls API and in response callback I have DispatchQueue.main.async block to update UI. In response I am receving on serverLangValue . If you copy and check following code with any project, you will get Command SwiftCompile failed with exit code (since this small pics of code it show file name but in atual profject it's not pointing file) . After commenting case translate (text): It will work fine let serverLangValue = // Server return value let switchEnum = translate (serverLangValue) let text = en //(or any other language code) switch switchEnum { case ABC: break case QPR: break case translate (text): break //From Xcode 16 and 15 swift compiler are file to process this case whereas older was working fine default: break } }
Replies
Boosts
Views
Activity
Oct ’24
Reply to Looking for the source code to "The Elements"
All I've been able to find is this translation into swift, done by someone outside of Apple.None of the JSON stuff is in there.https://github.com/ooper-shlab/TheElements-Swift
Replies
Boosts
Views
Activity
Dec ’17
Reply to CGAffineTransform -How to Align Video in Screen Center
If anyone has a better answer please post, I'll check and accept it Unbeknownst to me the video was in the correct position but the negative black bar space was causing the video to be appear that it was misaligned. Changing the AVMutableVideoCompositionInstruction() show the .backgroundColor show the negative black bar space issue in yellow: instruction.backgroundColor = UIColor.yellow.cgColor To fix it, I divided the finalTransform.ty in half and subtracted that from a translation-y-value, so now the code is: // ... let finalTransform = transform3.concatenating(rotateFromUpsideDown) let ty = finalTransform.ty var divided = ty/2 if divided < 0 { divided = 0 } let translation = CGAffineTransform(translationX: 0, y: -divided) let new_finalTransform = finalTransform.concatenating(translation) let transformer = AVMutableVideoCompositionLayerInstruction(assetTrack: track) transformer.setTransform(new_finalTransform, at: .zero) // ... The fix: The fix with the negative black bar space
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to UIImagePickerController: Camera preview on iPhone 12 (Pro) at undefined position?
Same here. I have tried to mitigate this using cameraViewTransform and while scaling to adjust to screen works, translating does not. Have tried several ways to create the transform and I can see the transform matrix being applied using a breakpoint. However, the scaling has effect while the translating (for centring purposes o for mitigating this issue) seem to have no effect. It only happens in iphone 12; iphone 11 (on both ios 13 and 14 do not exhibit this problem). It seems to me there is a bug in UIImagePickerController implementation.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’20
Reply to XMLDocument.xmlData(withOptions:) won't compile
Try this:let xdat: NSData = xDoc.xmlData(withOptions: Int (XMLNode.Options.nodePrettyPrint.rawValue)) as NSDataYou need to use .rawValue because XMLNode.Options is an OptionsSet and the xmlData method requires numeric options. You need Int(…) around it because the raw value is a UInt rather than an Int.You should file a bug report about this API. Either it should have translated (from the Obj-C header in the SDK) to a method that uses XMLNode.Options directly, or (if for some reason the withOptions parameter must be numeric) XMLNode.Options shouldn't be translated to an OptionsSet.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’16
Reply to Random AVAudioEngine crash
Well, that translates to AVAudioSessionErrorInsufficientPriority (AVAudioSession.h) but it shouldn't lead to a crash.Can you please file a bug for this crasher and attach a test case that reproduces the issue.thank you.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Sep ’15
Reply to could someone tell me what happens if I delete the profile of ios beta 9 and as recovery ?
I'm not understanding what you are writing. Are you having trouble installing the profile again from the Public Beta website?Try writing in your own language and I will use Google Translate.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’15
Reply to NSKeyArchiver
As noted in my first post above, this is code in Objective C, not Swift. If you want to use it in a Swift class you will need to translate into Swift.
Replies
Boosts
Views
Activity
Sep ’18