Search results for

column

2,051 results found

Post

Replies

Boosts

Views

Activity

How to drag 3D models smoothly
Hi guys,I have a problem when dragging 3D models.I'm using UIPanGestureRecognizer. Like code below.But when I drag the object. I can drag it up but I can't drag it down.I don't understand why?@objc func didMove(_ recognizer: UIPanGestureRecognizer) { let location = recognizer.location(in: sceneView) let arHitTestResult = sceneView.hitTest(location, types: [.existingPlaneUsingGeometry,.estimatedVerticalPlane,.estimatedHorizontalPlane,.existingPlane,.existingPlaneUsingExtent,.featurePoint]) if !arHitTestResult.isEmpty { print(You're dragging) guard let selectedNode=(hit?.node) as SCNNode? else { return } let transform = arHitTestResult.first?.worldTransform let newPosition = float3((transform?.columns.3.x)!, ((transform?.columns.3.y)!), (transform?.columns.3.z)!) selectedNode.simdPosition = newPosition sceneView.scene.rootNode.addChildNode(selectedNode) } }
0
0
958
Apr ’18
Reply to Xcode 9.3 Code Coverage
Hi Nataliia,It looks like code coverage is off by default in 9.3. You need to enable it in the scheme editor. Unfortunately, the Enable code coverage section of the Xcode Help docs is a little out-of-date. Here is the process:1. Choose Edit Scheme from the scheme menu in the toolbar.2. In the left column, select the Test scheme action.3. Click Options at the top of the right column.4. Click the “Gather coverage for” check box and set the popup to either all targets or some targets.5. Click Close.After doing this for a new iOS framework project, code coverage worked as expected for me. The Editor > Show Code Coverage command shows the results in the right margin.
Apr ’18
How to Symbolicating iOS Crash Reports With Xcode 9.3?
Hi, before XCode 9.3 you could symbolicate iOS Crash Reports by doing the following:Connect an iOS device to your MacChoose Devices from the Window menuUnder the DEVICES section in the left column, choose a deviceClick the View Device Logs button under the Device Information section on the right hand panelDrag your crash report onto the left column of the presented panelXcode will automatically symbolicate the crash report and display the resultsThis is from https://developer.apple.com/library/content/technotes/tn2151/_index.htmlThis worked fine for me until XCode 9.3. Now I can't drag the crash report to the left column anymore. Is there a new way to do this? Or is this a bug?
4
0
1.2k
Apr ’18
Reply to If parent Node will be moved, childnodes will followed.
I did. But when I use hitTest.first.node, the childnode will be touch, not all parts of the object. Can you look at my code?Here is my code when touching: let location = recognizer.location(in: sceneView) var hitTestOptions = [SCNHitTestOption: Any]() hitTestOptions[SCNHitTestOption.boundingBoxOnly] = true let hit=sceneView.hitTest(location, options: hitTestOptions).first print(You're dragging) guard let selectedNode=(hit?.node) as SCNNode? else { return } let transform = arHitTestResult.last?.worldTransform let newPosition = float3((transform?.columns.3.x)!, ((transform?.columns.3.y)!), (transform?.columns.3.z)!) selectedNode.simdPosition = newPosition sceneView.scene.rootNode.addChildNode(selectedNode)
Topic: Spatial Computing SubTopic: ARKit Tags:
Apr ’18
Reply to NSTextField intrinsicContentSize width is always -1 (NSViewNoInstrinsicMetric)
It’s correct that editable fields don’t have an intrinsic width. Typically they clip their contents to an arbitrary width, and during editing the field editor allows you to scroll through the text if it’s too large. In this case it sounds like you’ll want to constrain the field to its table cell so that it derives its width from the table column’s width.
Topic: UI Frameworks SubTopic: AppKit Tags:
Apr ’18
Reply to How to Swizzle Framework methods?
Actually I'm trying to create a replacement class for NSTableHeaderCell that allows table column headers to have two lines of text. Previously it worked when poseAsClass feature was available. Now as it is deprecated, I need an alternative to maintain the functionality of poseAsClass, so I tried implementing method swizzling.Thanks
Topic: Programming Languages SubTopic: General Tags:
Apr ’18
Reply to Hi, I am working on the IOS application, related to voice over, my Question is : When accessibility voice over was enabled how can i get the single gestures left, right, top and down, what are the function for detecting these in swift?
You should have a look here (if not done yet):h ttps://www.apple.com/voiceover/info/guide/_1137.htmlTo assign commands to gestures:When VoiceOver is on, open VoiceOver Utility by pressing VO-F8.Click the Commanders category, click Trackpad, and make sure the Enable Trackpad Commander checkbox is selected.Click Assign Commands.From the pop-up menu, choose the modifier key to use with gestures. By default, Command is used.Unlike standard VoiceOver gestures, you must hold down a modifier key to use customized gestures.Interact with the Trackpad Gesture Commands table and navigate down the gesture column until you hear the gesture you want to assign a command to.Interacting with content areasMove to the Command column, open the pop-up menu of commands, and then use the arrow keys to navigate the available commands.A screen shot of the Trackpad Commander. The VoiceOver Utility window, divided vertically into two parts. A sidebar on the left lists categories, preceded by an icon, and an area on th
Topic: Programming Languages SubTopic: Swift Tags:
May ’18
Reply to Delete items in collection view with custom layout
Ok... Heres the view controller code, and below it the layout code (poached from StackOverflow if I remember right):import UIKitclass testVCViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ImagesCVLayoutDelegate { @IBOutlet weak var cv: UICollectionView! @IBOutlet weak var btn: UIButton! @IBAction func btn(_ sender: UIButton) { items.remove(at: 0) cv.deleteItems(at: [IndexPath(row: 0, section: 0)]) // THIS IS WHERE THE WARNINGS AND ERROR OCCUR. cv.reloadData() } var items = [1,2,3,4,5,6,7,8,9] // Data source. func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cell, for: indexPath) as! zCollectionViewCell cell.lbl.text = (items[indexPath.row]) return cell } func numberOfSections
Topic: Programming Languages SubTopic: Swift Tags:
May ’18
Reply to Delete items in collection view with custom layout
I edited with <> to make it more readableimport UIKit class testVCViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ImagesCVLayoutDelegate { @IBOutlet weak var cv: UICollectionView! @IBOutlet weak var btn: UIButton! @IBAction func btn(_ sender: UIButton) { items.remove(at: 0) cv.deleteItems(at: [IndexPath(row: 0, section: 0)]) // THIS IS WHERE THE WARNINGS AND ERROR OCCUR. cv.reloadData() } var items = [1,2,3,4,5,6,7,8,9] // Data source. func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cell, for: indexPath) as! zCollectionViewCell cell.lbl.text = (items[indexPath.row]) return cell } func numberOfSections(in collectionView: UICollectionView) -> Int { return 1 } func co
Topic: Programming Languages SubTopic: Swift Tags:
May ’18
Reply to Installing Configuration Profile on Apple TV 4K
I tried this and it doesn't work for me. I'm having a real problem getting the profile installed. The device shows up as an installed device but I can't make any changes. Both XCode and Configurator seem to work OK, but have no effect on the Apple TV 4K. I sure miss that USB port. Why the **** did Apple remove it?In Xcode, select the Apple TV in the left column under Discovered.The status of the Apple TV connection request appears in the detail area. (Discovered doesn't appear)Enter the verification code displayed on the Apple TV, then click Connect. (No verification code displayed)Xcode pairs with the Apple TV and a network icon appears next the the Apple TV in the left column.Now what?Thanks, Ron...
Topic: App & System Services SubTopic: Core OS Tags:
May ’18
Reply to Proper way to update certificate in keychain
I’m going to presume, based on the presence of the TARGET_IPHONE_SIMULATOR conditionals, that you’re working on an iOS-based platform. If that’s wrong, and this code is running on macOS, let me know because that can have a big impact on keychain code. However, when I create the update query, it fails (-25303) when I use kSecValueRef: Error -25303 is errSecNoSuchAttr, which is a little weird. To understand what’s going on here you have to understand that under the covers the keychain is a database where: Each keychain item class (Internet password, generic password, certificate, key) is its own table.Within a table, the columns represent the various keychain attributes.And the rows represent keychain items of that class.There is a uniqueness constraint across a set of columns to avoid duplicates (see the reference docs for errSecDuplicateItem for details).So the fundamental keychain operations all work in terms of attributes, and when you pass in meta attributes, like kSecValueRef or kSecValu
Topic: Privacy & Security SubTopic: General Tags:
May ’18
multiple columns swift 4
Is there a way to create a UITableView or a UIVIew that I can utilize mutliple columns? I am making a custom application for a data analysics colleage at my job who would like to display mutliple colums within a single view whether it is a UITableView or a UIView. The only options he could think of is creating an image from the results of a database query or creat a website and use the UIWebKit to display the information.Thank you in advance.
Topic: UI Frameworks SubTopic: UIKit Tags:
4
0
5.6k
May ’18
Reply to Swift 3 @objc inference and build failed issue
>Could there be something else that is preventing the project to build?I'd follow the cleaning steps as listed first, then if still no joy, try Xcode's menu Product/Analyze - when it's done, select the 'report navigator' (right-most speech bubble icon in the navigator column on the left), then select the appName, and tap to toggle, then choose 'Analyze Today <time>' - there should be a red ⚠ icon for any issue...look thru the list on the right for any lines with red colored text - double tap on them to go to the line in your code (assuming it's your code and not a configuration issue).See anything?
Jun ’18