Search results for

xcode github

94,736 results found

Post

Replies

Boosts

Views

Activity

Reply to Transparent Proxy seems to break Mail.app on Big Sur
Greetings, @meaton! I've put the code on github: https://github.com/ngorskikh/transparentproxyrepro I've updated the feedback, too, but it looks like attachments don't work for some reason -- or at least I can't see my own attachments, even though the original feedback request contained some automatically collected logs, as well as a zip with an xcode project and a couple of screenshots. Kind regards, ngorskikh.
Sep ’20
Reply to Swift - Insert [AnyObject] into [NSMutableDictionnary]
This code: dataArray = [[jobs: ctlelems[x], unload: 0]];is replacing the whole content of dataArray with the single element array. It does not work as Insert.To append an element to Array: dataArray += [[jobs: ctlelems[x], unload: 0]]or dataArray.append([jobs: ctlelems[x], unload: 0])Found nil is another problem. You use too much unwrapping operators (!), without checking the optional value is nil or not.Put nil checking code before using !.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’15
Reply to Decodable and CGPoint
It depends a bit on the scale of the problem.One solution would be just to write the manual decoding for types like Circle that contain a CGPoint. The synthesized code is almost trivial to re-create manually, so it's just a question of source code size.Or, you could try to finagle the types like Circle like this:struct MyPointStruct: Decodable { let x: CGFloat let y: CGFloat } struct Circle: Decodable { private var _center: MyPointStruct var center: CGPoint { get { return CGPoint (x: _center.x, y: _center.y) } set { _center = MyPointStruct (x: newValue.x, y: newValue.y) } } }Or perhaps slightly more cleanly, if you have lot of point-containing structs:struct MyPointStruct: Decodable { var x: CGFloat var y: CGFloat var point: CGPoint { get { return CGPoint (x: x, y: y) } set { x = newValue.x; y = newValue.y } } } struct Circle: Decodable { private var _center: MyPointStruct var center: CGPoint { get { return _center.point } set {
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’17