This project is a pure mimic of Allen Wang's 30DaysofSwift, I'm trying to redo what he had done, meanwhile, I'm going to provide more resources.
###Project 01 - SimpleStopWatch
Auto Layout : https://www.raywenderlich.com/115440/auto-layout-tutorial-in-ios-9-part-1-getting-started-2
NSTimer : http://www.ios-blog.co.uk/tutorials/swift/swift-nstimer-tutorial-lets-create-a-counter-application/
A youtube video about NSTimer : https://www.youtube.com/watch?v=X_Z7nAyUbj4
It took me some time figure out the scheduledTimerWithTimeInterval
function. selector is followed by function, userInfo is set to nil, repeats should return true because we're repeatingly count time.
###Project 02 - Custom Font
Custom Font in swift : https://grokswift.com/custom-fonts/
UITableView : make sure you understand delegate, datasource before you try to implement this. maybe read here, actually I myself didn't understand them quite well.
Possible improvements : make a Custom UIButton, then apply the change font button as custom UIButton. like here ?
https://www.raywenderlich.com/90690/modern-core-graphics-with-swift-part-1
###Project 03 - Play Local Video
Custom Cell for UITableViewCell : https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson7.html#//apple_ref/doc/uid/TP40015214-CH8-SW1
It seemed that the playViewController is like the UIPageView, no view actully exists in this case.
Also notice here used a video struct, not a class.
###Project 04 - Snap Chat Menu
I have problems with AutoLayout, the constrains, my project is so ugly compared with the original one.
Resources:
https://www.youtube.com/watch?v=1_daE3IL_1s
https://www.youtube.com/watch?v=994Hsi1zs6Q
###Project 05 - CarouselEffect
Resources:
UICollectionView is just like UITableView, you could make it if you know UITableView well, the whole tutorial can be found here:
https://www.youtube.com/watch?v=JG7mWFcU0vk
What impressed me is that the tutorial did things in the unusual way in this tutorial, like use Extension and didset to change UI.
I implement it more the common and easier way.
Found some hints why my view is ugly, for image fill, I should aspect fill.
http://blog.csdn.net/annkie/article/details/49247755
It took me some time to figure out why his App is looks so gorgeous, then I found out he used background image, blur effect, nice button background image, designer behavior.
Video tutorial: https://www.youtube.com/watch?v=kkVI3njOlqU
There're many different coding styles can be used to call the CLLocationManager, just make sure you add the plist and also save the battery.
Video tutorial: https://www.youtube.com/watch?v=F-7xwYh1CS4
If you have a tableViewController, you can just get RefreshControl in this way. get it in interface builder. https://medium.com/ios-os-x-development/ios-tips-pull-to-refresh-in-less-than-30-seconds-ef884520f0df#.lhklb6ftj
If you just have a tableView without controller, you can get add the RefreshControl this way. http://stackoverflow.com/questions/10291537/pull-to-refresh-uitableview-without-uitableviewcontroller
For UI, a lot of things you can set both in code and Interface builder, I set some them in Interface Builder.
A great article about CALayer, including gradient layer : https://www.raywenderlich.com/90488/calayer-in-ios-with-swift-10-examples
UI vs CG : CG is for CoreGraphics, it feels more to the core OS, UI feels itself already packed for the developer.
I'm lazy toda, followed this tutorial, write four lines of code to implement this, didn't try to recenter the image or other... also create UIScrollView from Interface Builder, not code.
Video Tutorial: https://www.youtube.com/watch?v=nre-ALSA740
It's time to use other code in your App.
you got have this first : https://github.com/movielala/VideoSplashKit
Then you can follow this video tutorial : https://www.youtube.com/watch?v=dIoLsD9kBJ0&index=1&list=LLUS_GStRI7zBGfy1SVfDQOQ
And finally, I found a way to setup rounded corner button in Storyboard, just fantastic. http://stackoverflow.com/questions/18384832/no-round-rect-button-in-xcode-5
Also, notice did the lauchscreen view this time.
Custom cell background can use this, tableView ...willDisplayCell...., actually just use the ClearTableViewController I can get quite decent look .
But Custom the cell can make the gradient more elegent.
It didn't take me long to build the UI and contraints, but later when I try to implement the animation it really took me a long time to figure out why, I found that the autolayout constraints may make the animation not function right.
I tried to follow this tutorial, it will funtion on the author's project, but not mine.
https://www.raywenderlich.com/113674/ios-animation-tutorial-getting-started
But still, I remember that constaints are also objects, that's why I can try to implement that as Allen's way.
And after I have finished implement, I found this tutorial : http://www.appcoda.com/view-animation-in-swift/
You can follow.
This project is just an extend of Project 11, but with more animation. It feels like a combination of project 11 and 12.
And Doing this project I typed a lot of repeat code, there must be some way to solve this except copy, like maybe extension or other things. And this is to be learn.
3 ways to generate random number in Swift : http://stackoverflow.com/questions/32552336/generating-random-numbers-with-swift-2
let random = Int(arc4random_uniform(imageArray.count))
would be a better choice.
Also, I made some changes to orginal code.
Tutorial : http://iosdevtips.co/post/88481653818/twitter-ios-app-bird-zoom-animation and here:
http://qiita.com/okmr-d/items/07731aa1ede2998d823d
It is very interesting that all the code are written in AppDelegate.Swift, since this only concerns the first time that the App launches.
Also some code difference.
animateWithDuration is type method,just UIColor.greenColor(), alwasy start with UIView.animateWithDuration....
I implement this via this way.
https://github.com/ldbchan/SlideMenu_iOS
And great tutorial to be learned here : http://mathewsanders.com/prototyping-iOS-iPhone-iPad-animations-in-swift/#why-xcode