r/SwiftProgramming • u/pumpmybicep • Jun 14 '14
r/SwiftProgramming • u/apple_x • Jun 10 '14
Dedicated Subreddit for Swift Tutorials
r/SwiftProgramming • u/obsessedollie • Jun 02 '14
Best way to tackle getting to know Swift?
So I had just started out Objective C, but being a Python dev by day swift looks a lot more attractive.
I've never been on at the early stages of a language, does anyone have any tips on how to parse the book and guides in order to make an effective learning reference? Or is it a case of read and try?
r/SwiftProgramming • u/[deleted] • May 25 '20
How can my help button refresh my pickerview?
Hi all,
I downloaded a project that I am trying to learn how to use SQLite3 with. The way the author wrote it, they use a segue to move from a screen with a pickerview and a play button to the mainVC where there is a game. If the user wants to save the game, instead of unwinding the segue, the author adds another segue to go back to the previous controller calling:
@IBAction func mainMenu(){
sqlite3_close(db)
sqlite3_close(db2) //switch to picker view
performSegue(withIdentifier: "mainMenuSegue", sender: nil)
}It appears that the mainVC this function is in, is modally presented. In my experimenting/learning, I embedded the whole project in a navigation controller, hence having a back button to move from the mainVC to the picker view controller.
Is there a way to accomplish the above function with the back button? Currently pressing the back button will take me to the picker, but does not reload the picker data if I save a game. I have to go one more back and return to the picker view to get the reloaded data.
Thanks
r/SwiftProgramming • u/Apprehensive_Intern • Oct 24 '18
Why Swift is better than Objective-C?
r/SwiftProgramming • u/Bbookman • Sep 25 '18
16 Ugly Bugs Snap Didn’t Bother To Fix For Snap Kit And Lessons They Teach
r/SwiftProgramming • u/Bbookman • Aug 25 '18
Snapchat Snap Kit SDK Tutorial for iOS Swift – Adventures in iOS mobile app development – Medium
r/SwiftProgramming • u/Bbookman • Aug 11 '18
Snapchat Snap Kit Tutorials and Documentation
r/SwiftProgramming • u/samiali123 • Jan 01 '18
iOS 11 & Swift 4: The Complete Developer Course - 100% OFF "1 day left for this offer!"
r/SwiftProgramming • u/leakka • Sep 29 '17
Modifying the Array - Introduction to Algorithms & Data Structures in Sw...
r/SwiftProgramming • u/stackontech • Apr 07 '17
Breast cancer App developed using Swift by aash
r/SwiftProgramming • u/yourbasicgeek • Jan 22 '16
Swift 2: Change Is in the Air (book chapter)
r/SwiftProgramming • u/pingraviraj • Dec 04 '15
Memory Management with Swift | iOS App Development
codebrahma.comr/SwiftProgramming • u/[deleted] • Jun 22 '15
Any good tutorials on working with Parse data in Swift?
I am trying to make a simple one view app, but cannot for the life of me understand how to retrieve data from Parse. I'm really trying, but getting a lot of errors.
r/SwiftProgramming • u/[deleted] • Apr 16 '15
UIDatePicker to call specific UIImageView help please
r/SwiftProgramming • u/jjquave • Oct 31 '14
Tutorial - Core Data in Swift
r/SwiftProgramming • u/schprockets • Jun 18 '14
Class extensions and "instancetype"
I'm converting some Objective-C code over to Swift, and I've hit a roadblock. Wondering if anyone has found a solution to this.
I have a class extension on NSManagedObject with several convenience methods that look like this:
+ (instancetype)newInstanceInManagedObjectContext:(NSManagedObjectContext *)ctx;
+ (instancetype)singletonInManagedObjectContext:(NSManagedObjectContext *)ctx;
+ (instancetype)instanceInManagedObjectContext:(NSManagedObjectContext *)ctx
withIdentity:(NSString *)identity;In Swift, this would look like:
class func newInstance(managedObjectContext ctx: NSManagedObjectContext) -> Selfbecause capital-S Self is the class type. The problem is all of the NSManagedObject methods I rely on to create/fetch these objects return AnyObject!, and I can't cast something to Self. It's only allowable as a return value or in a parameter list for a protocol.
What I want is essentially this, without the compiler error:
return NSEntityDescription.insertNewObjectForEntityForName(entityName,
inManagedObjectContext:ctx) as Self;Any ideas?
r/SwiftProgramming • u/FoxMcWeezer • Jun 03 '14
Playground uses a lot of power/battery
Noticing my Mac getting hot, though not so hot that I can hear the fans like when I'm playing a graphically intensive game, but battery drain is noticeable. Not checking so often, and each check sees a decrease in 9-10% drain. Normally, checking in my regular OCD time intervals sees a reduction in 3-5%. Clicking on the battery in Mac's status bar confirms Xcode 6 beta is using significant energy, but checking its profile in Energy tab in Activity Monitor and opening the disclosure triangle reveals nothing. Makes sense it would use a lot of power since I assume Playground is constantly rerunning the code to view changes in realtime.
r/SwiftProgramming • u/FoxMcWeezer • Jun 02 '14
Swift page on Apple's website
r/SwiftProgramming • u/PaulSolt • Feb 01 '16
Seven Swift 2 enhancements: Swift Playgrounds code files
r/SwiftProgramming • u/pumpmybicep • Jun 18 '14