Post

Replies

Boosts

Views

Activity

"iMessage is no longer available" notification pops up when using Xcode
Whenever I use Xcode, the notification "iMessage is no longer available on this device" constantly pops up. Additionally, my MacBook has a restriction on Messages via an MDM profile, which would explain why I get the notification, but not why I get it whenever I'm using Xcode. So is there any way I can prevent the notification from constantly popping up while using Xcode without actually removing the profile?Thank you.
0
0
440
Apr ’20
Why is 0, 0 on CGPoint on the right-center end of the view?
I created a rectangle using CGRect, but I can't seem to center it relative to the frame size. And when setting the x and y values to 0, it would end up in the right-center (not exactly centered, actually, unless it's calculated by the bottom end of the object) end of the screen, rather than the actual center or the left corner. So how would I make point 0, 0 be at the center of the screen, if possible, and how would I center my shape at the (bottom) middle of the screen relative to the frame size?import PlaygroundSupport import SpriteKit class GameScene: SKScene { var textBackground = SKShapeNode(rect: .zero) override func didMove(to view: SKView) { textBackground = SKShapeNode(rect: CGRect(x: 0, y: 0, width: frame.size.width - 300, height: frame.size.height / 6)) textBackground.fillColor = SKColor.init(red: 255, green: 255, blue: 255, alpha: 0.5) textBackground.strokeColor = SKColor.clear addChild(textBackground) } @objc static override var supportsSecureCoding: Bool { get { return true } } override func update(_ currentTime: TimeInterval) { } } let sceneView = SKView(frame: CGRect(x: 0 , y:0, width: 1024, height: 1366)) if let scene = GameScene(fileNamed: "GameScene") { // scene.scaleMode = .aspectFill sceneView.presentScene(scene) } PlaygroundSupport.PlaygroundPage.current.liveView = sceneViewAlso, my shape width also looks off since I wanted it to cover almost the width of the whole screen except for the ends, so using the frame width and cutting it short a few points was what I thought would be the best way to do it. Only subtracting 300 points was the only way I could get it to work, which looks like a bit too much, so I'm wondering if my view's whole x-coordinates are somehow off?Any help would be greatly appreciated. Thank you.
3
0
2.5k
May ’20