Post

Replies

Boosts

Views

Activity

Share iCloud on Website XD
Hi I am trying to publish parts ore my hole iCloud on a Website. I am looking for days to finde a way to do that. I am hosting the Website from a Mac mini with macOS X Server. The easiest way I see is with CloudKit. Has anyone an idea? In the end something like https://www.icloud.com would be exactly what I want. But how? XD Ps: i am open for everything. Can be done over app (Xcode) can be done with server stuff what i have no idea about... Everything
0
0
481
Apr ’22
Add multiple Objekts to my Scene
i have a function that should create a Sphere. and that is working fine. But if i call this function multiple times i can just see the last created Objekt in the scene. var AllObjekts = [SCNNode]() func createSphere(X: Float, Y: Float, Z: Float, NumObj: Int, Color: NSColor){     let sceneView = BrainView           let scene = SCNScene(named: "Brain.scn")     sceneView?.scene = scene           let geometry:SCNGeometry = SCNSphere(radius: 0.1)     geometry.materials.first?.diffuse.contents = Color //NSColor.red           let geometryNode = SCNNode(geometry: geometry)     AllObjekts.append(geometryNode)     geometryNode.position = SCNVector3(x: CGFloat(X), y: CGFloat(Y), z: CGFloat(Z))     scene?.rootNode.addChildNode(AllObjekts[NumObj])   } createSphere(X: 0, Y: 0, Z: 0, NumObj: 0, Color: .green)     createSphere(X: 1, Y: 0, Z: 0, NumObj: 1, Color: .blue) how the fuck can i fix it?
1
0
655
Jul ’21
CGRect Values append in Array
Hi I try to safe x, y, width and height values from a Objekt detection AI in a Array. rectangle = CGRect(x: boundingBox.minX*image.size.width, y: (1-boundingBox.minY-boundingBox.height)*image.size.height, width: boundingBox.width*image.size.width, height: boundingBox.height*image.size.height) var XPoitions: [Double] = Array() XPoitions.append(rectangle.origin.x) The Error say "No exact matches in call to instance method 'append'". And i am not sure how to fix it......
2
0
2.8k
Jun ’21
Json decoder
Hi, my Json file looks like that: {"Synapses": [["ID: 0", "XPosition: 387.8125", "YPosition: 502.96875", "Width: 187.375", "Height: 122.0625"],["ID: 16", "XPosition: 490.859375", "YPosition: 947.15625", "Width: 49.28125", "Height: 69.6875"]]} Ps: i deleted the arrays from 2 to 15. its nearly all the same. and thats my load function: func load(){//fileName: String) {           if let filemanger = Bundle.main.url(forResource: "Synapses", withExtension: "json"){               do{         let data = try Foundation.Data(contentsOf: filemanger)         let jsondecoder = JSONDecoder()         let datafromjson = try jsondecoder.decode([SynapsData].self, from: data)                   self.Data = datafromjson       }catch{         print("fuck ey so ne scheisse\(error)")       }     }   } struct SynapsData: Codable {   var ID : Int   var SynapsX : CGFloat   var SynapsY : CGFloat   var SynapsWidth : CGFloat   var SynapsHeight : CGFloat } And my Output is just []. I just don't see the problem 😅.
2
0
636
Jun ’21