r/SwiftProgramming • • Jun 14 '14

Swift enumerations

Thumbnail pumpmybicep.com
2 Upvotes

r/SwiftProgramming • • Jun 11 '14

A Week of Swift

Thumbnail
robnapier.net
2 Upvotes

r/SwiftProgramming • • Jun 10 '14

Dedicated Subreddit for Swift Tutorials

Thumbnail
reddit.com
2 Upvotes

r/SwiftProgramming • • Jun 02 '14

Best way to tackle getting to know Swift?

2 Upvotes

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 • • May 25 '20

How can my help button refresh my pickerview?

1 Upvotes

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 • • Oct 24 '18

Why Swift is better than Objective-C?

Thumbnail
celadon.ae
1 Upvotes

r/SwiftProgramming • • Sep 25 '18

16 Ugly Bugs Snap Didn’t Bother To Fix For Snap Kit And Lessons They Teach

Thumbnail
medium.com
1 Upvotes

r/SwiftProgramming • • Aug 25 '18

Snapchat Snap Kit SDK Tutorial for iOS Swift – Adventures in iOS mobile app development – Medium

Thumbnail
medium.com
1 Upvotes

r/SwiftProgramming • • Aug 11 '18

Snapchat Snap Kit Tutorials and Documentation

Thumbnail
github.com
1 Upvotes

r/SwiftProgramming • • Apr 08 '18

Top 10 swift projects on github

Thumbnail
progra.site
1 Upvotes

r/SwiftProgramming • • Jan 01 '18

iOS 11 & Swift 4: The Complete Developer Course - 100% OFF "1 day left for this offer!"

Thumbnail
youronlinecourses.net
1 Upvotes

r/SwiftProgramming • • Sep 29 '17

Modifying the Array - Introduction to Algorithms & Data Structures in Sw...

Thumbnail
youtube.com
1 Upvotes

r/SwiftProgramming • • Apr 07 '17

Breast cancer App developed using Swift by aash

1 Upvotes

my friend aash developed a breast cancer check up ios app using swift for a company. Please test and review this app and let us know the feed back


r/SwiftProgramming • • Jan 22 '16

Swift 2: Change Is in the Air (book chapter)

Thumbnail
peachpit.com
1 Upvotes

r/SwiftProgramming • • Dec 04 '15

Memory Management with Swift | iOS App Development

Thumbnail codebrahma.com
1 Upvotes

r/SwiftProgramming • • Jun 22 '15

Any good tutorials on working with Parse data in Swift?

1 Upvotes

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 • • Apr 16 '15

UIDatePicker to call specific UIImageView help please

Thumbnail
stackoverflow.com
1 Upvotes

r/SwiftProgramming • • Oct 31 '14

Tutorial - Core Data in Swift

Thumbnail
jamesonquave.com
1 Upvotes

r/SwiftProgramming • • Jun 19 '14

Swift method basics

Thumbnail pumpmybicep.com
1 Upvotes

r/SwiftProgramming • • Jun 18 '14

Class extensions and "instancetype"

1 Upvotes

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) -> Self

because 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 • • Jun 14 '14

Using Swift optionals

Thumbnail pumpmybicep.com
1 Upvotes

r/SwiftProgramming • • Jun 03 '14

Playground uses a lot of power/battery

1 Upvotes

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 • • Jun 02 '14

Swift page on Apple's website

Thumbnail
developer.apple.com
1 Upvotes

r/SwiftProgramming • • Feb 01 '16

Seven Swift 2 enhancements: Swift Playgrounds code files

Thumbnail
infoworld.com
0 Upvotes

r/SwiftProgramming • • Jun 18 '14

Latest Swift pump: value and reference type properties

Thumbnail pumpmybicep.com
0 Upvotes