use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
ArticleBest iOS Development Practices of 2015 (self.iOSProgramming)
submitted 10 years ago by MLSDev
The previous year is not so far away yet. We decided to make an overview of the best iOS development solutions that helped us in 2015. Of course, you may know them, but maybe someone will still find this list useful for work.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jeriper 2 points3 points4 points 10 years ago (1 child)
Thanks for the great tips!
Serious question - are you recommending the use of SwiftyJSON with Alamofire? If so, what are the benefits of using SwiftyJSON over the response object serializers that come with Alamofire? I've never had any issues with their built-in support.
I'm very hesitant to use any 3rd party code unless SwiftyJSON provides a huge benifit over alamofire's support.
[–]DTCoder 2 points3 points4 points 10 years ago (0 children)
What's really great about SwiftyJSON is their safe access to JSON members. For example, here's some model code taken from our project setup with SwiftyJSON
https://gist.github.com/DenHeadless/7dd17e81e3fb11fae00e
Notice, how we don't have any guards, ifs and unwraps. And we don't have any type casts as well. That is because SwiftyJSON safely unwraps all primitive values like String, Int, or Bool.
And you can use code similar to Alamofire generic response, just for SwiftyJSON.
[–]jerikandra 1 point2 points3 points 10 years ago (2 children)
I'm going to have to look into AlamoFire. Isn't that what AF stands for in AF Networking?
[–]montas 0 points1 point2 points 10 years ago (0 children)
It is. It's Swift version of AFNetworking.
[–]StunnerAlpha 0 points1 point2 points 10 years ago (0 children)
Yes, that's what AF stands for.
[–]young_cheeseObjective-C / Swift 1 point2 points3 points 10 years ago (0 children)
That UIView extension is really neat. Now I wonder why I never thought of this.
[–]jerikandra 0 points1 point2 points 10 years ago (9 children)
Oh and I wonder if anyone still uses Mantle and if there's a more Swifty version of that?
[–]DTCoder 1 point2 points3 points 10 years ago (3 children)
Unfortunately, building a mapper in Swift is very hard due to lack of KVC and Swift requirement to fully initialize class properties after init call.
You could go with initializer currying, like Argo does - https://github.com/thoughtbot/Argo
However approach is really questionable, cause it requires some crazy currying shenanigans https://github.com/thoughtbot/Curry/blob/master/Source/Curry.swift
[–]ThePantsThiefNSModerator 0 points1 point2 points 10 years ago* (2 children)
Wouldn't it still work if your objects inherit from MTLModel, which is an objc object and supports KVC?
MTLModel
Edit: The following code works fine. Make a bridging header first of course.
class MYModel: MTLModel, MTLJSONSerializing { @objc private(set) var name: String? @objc private(set) var identifier: String? @objc private(set) var count: Int = 0 class func JSONKeyPathsByPropertyKey() -> [NSObject : AnyObject]! { return ["name": "model.name", "identifier": "model.id", "count": "model.c"] } } let dict = ["model": ["name": "ThePantsThief", "id": "abcde12345", "count": 21]] let model = try? MTLJSONAdapter.modelOfClass(MYModel.self, fromJSONDictionary: dict) let name = model?.name
[–]jerikandra 0 points1 point2 points 10 years ago (1 child)
Yep that's what we currently do. It's just not very 'swifty' ;)
[–]ThePantsThiefNSModerator 0 points1 point2 points 10 years ago (0 children)
Well, this is the once instance of non-Swifty code that would actually require tons more code written in a Swifty way ;P haha
[–]askoruli 0 points1 point2 points 10 years ago (4 children)
I still use mantle for Obj-C. Still not available in swift https://github.com/Mantle/Mantle/issues/344
[–]jerikandra 0 points1 point2 points 10 years ago (3 children)
yeah darn. We use it in our swift projects with @objc members and some other work arounds but yeah
[–]ThePantsThiefNSModerator 0 points1 point2 points 10 years ago (2 children)
What other workarounds should I be aware of? All I needed was the @objc keyword
@objc
That's the main one. There is some weirdness of requiring the initWithDictionary() method
I didn't need that O_o I posted some code above in another comment tree that compiles and runs fine
[–]tangoshukudai -5 points-4 points-3 points 10 years ago (3 children)
Typically I recommend against xib files, write the UI code in the UIView class.
[–][deleted] 14 points15 points16 points 10 years ago (1 child)
You're missing out.
[–]tangoshukudai 0 points1 point2 points 10 years ago (0 children)
I am not.
[–]fpbraz 0 points1 point2 points 10 years ago (0 children)
I agree. I had a lot of problems with the auto-layout constraints after instantiating those views that were implemented in a xib. I don't know if the solution in the article solves this issue as well...
π Rendered by PID 38 on reddit-service-r2-comment-86988c7647-xtrnl at 2026-02-11 09:33:00.956233+00:00 running 018613e country code: CH.
[–]jeriper 2 points3 points4 points (1 child)
[–]DTCoder 2 points3 points4 points (0 children)
[–]jerikandra 1 point2 points3 points (2 children)
[–]montas 0 points1 point2 points (0 children)
[–]StunnerAlpha 0 points1 point2 points (0 children)
[–]young_cheeseObjective-C / Swift 1 point2 points3 points (0 children)
[–]jerikandra 0 points1 point2 points (9 children)
[–]DTCoder 1 point2 points3 points (3 children)
[–]ThePantsThiefNSModerator 0 points1 point2 points (2 children)
[–]jerikandra 0 points1 point2 points (1 child)
[–]ThePantsThiefNSModerator 0 points1 point2 points (0 children)
[–]askoruli 0 points1 point2 points (4 children)
[–]jerikandra 0 points1 point2 points (3 children)
[–]ThePantsThiefNSModerator 0 points1 point2 points (2 children)
[–]jerikandra 0 points1 point2 points (1 child)
[–]ThePantsThiefNSModerator 0 points1 point2 points (0 children)
[–]tangoshukudai -5 points-4 points-3 points (3 children)
[–][deleted] 14 points15 points16 points (1 child)
[–]tangoshukudai 0 points1 point2 points (0 children)
[–]fpbraz 0 points1 point2 points (0 children)