Swift Enlightenment

I started this this blog to better expand my knowledge of Swift and hope to help others do the same. I have already known Swift but will start from the basics. This was inspired by a couple other blogs and repos, just decided to make my own, and open source

30 Projects so far..

Project 1 - Tap Counter

A simple tap counter, where you tap on the button and it increments the number. Pressing reset sets the number back to zero.

Utilized

  • Build an Interface with Labels and Buttons

  • Using functions with buttons

  • String Interpolation

Project 2 - Show Alert

Pressing a button to makes an alert popup.

Utilized

  • Build an Interface with Labels and Buttons

  • Using functions with buttons

  • UIAlertController

Project 3 - Tip Calculator

Simple Tip Calculator

Utilized

  • CocoaPods

  • mySliderValueChanged

  • UIControlEvents.EditingChanged

Project 4 - Stopwatch

A simple stopwatch that can start counting, pause, and reset.

Utilized

  • NSTimer

  • scheduledTimerWithTimeInterval

  • Timer invalidate

Project 5 - Font Changer

Pressing a button changes the custom font to another custom font.

Utilized

  • UIFont

  • Custom Fonts

Project 6 - TableView

Creating a basic TableView

Utilized

  • UITableViewDelegate

  • UITableViewDataSource

Project 7 - CollectionView

Creating a basic CollectionView

Utilized

  • UICollectionViewDataSource

  • UICollectionViewDelegate

  • dequeueReusableCellWithReuseIdentifier

Project 8 - Play Local Video

Play video that is saved locally in the app.

Utilized

  • NSBundle.mainBundle

  • AVPlayer

Project 9 - Play YouTube Video

Play video that is on Youtube.

Utilized

  • YoutubeSourceParserKit

  • MediaPlayer

Project 10 - Get Time

Gets the current date and time to the second. Pressing the update button updates the date / time.

Utilized

  • NSDateFormatter

Project 11 - Passing Data

Gets the current date and time to the second. Pressing the update button updates the date / time.

Utilized

  • destinationViewController

Project 12 - Slide To Dismiss

Using UISwipeGestureRecognizer we can slide down to dismiss the keyboard.

Utilized

  • UISwipeGestureRecognizer

  • resignFirstResponder

Project 13 - Image Picker

Pressing a button will bring up the image picker. The user then chooses the image and it is shown in an image view.

Utilized

  • UIImagePickerController

  • UINavigationControllerDelegate

  • UIImagePickerControllerDelegate

  • UIImagePickerControllerSourceType

Project 14 - Pull to Refresh

Sliding down on a table view refreshes the list.

Utilized

  • UIRefreshControl

Project 15 - Delete Rearrange

Deleting and rearranging cells in a table view.

Utilized

  • UITableView

  • canMoveRowAtIndexPath

  • moveRowAtIndexPath

Project 16 - Add To List

Adding an item to a TableView

Utilized

  • Append to array

  • reloadData

Project 17 - Custom TableView

Creating and populating custom cells in TableViews

Utilized

  • dequeueReusableCellWithIdentifier

  • UITableViewCell class

  • configureCell method

Project 18 - Custom CollectionView

Creating and populating custom cells in CollectionView

Utilized

  • sizeForItemAtIndexPath

  • UICollectionViewCell class

  • configureCell method

Project 19 - GetLocation

Creating and populating custom cells in CollectionView

Utilized

  • CLLocationManager

  • MapKit

  • didUpdateLocations method

Project 20 - ActionSheets

Pressing the share button brings up an ActionSheet where you have more buttons to choose from.

Utilized

  • UIActionSheetDelegate

  • UIAlertController

  • UIAlertAction

Project 21 - BackgroundVideo

Sometimes video intros are pretty cool!

Utilized

  • VideoSplashViewController.swift

  • VideoCutter.swift

  • preferredStatusBarStyle

Project 22 - ScrollView

Using a scrollview to scroll down the page to see further content.

Utilized

  • UIScrollView

Project 23 - SplashScreen

Twitter like splash screen.

Utilized

  • http://iosdevtips.co/post/88481653818/twitter-ios-app-bird-zoom-animation

Project 24 - Localization

Using localizable strings. When the system language is changed, the strings in the app change.

Utilized

  • Localizable.strings

  • http://rshankar.com/internationalization-and-localization-of-apps-in-xcode-6-and-swift/

Project 25 - BasicAnimations

Creating basic animations for textfields, button, and a label. Textfields and buttons slide on and off and title labels alpha is set to 0.

Utilized

  • animateWithDuration

Project 26 - SnapChatLikeCamera

Swiping right or left goes to different views. One of which is a camera.

Utilized

  • Appending views to scroll views

  • Accessing the front camera

  • https://www.youtube.com/watch?v=994Hsi1zs6Q

Project 27 - LimitingCharacters

Limiting characters of a textfield to a set number.

Utilized

  • shouldChangeCharactersInRange

  • editedTextField

Project 28 - APICall

Making and API call with Alamofire then parsing the JSON object with SwiftyJSON

Utilized

  • Alamofire

  • SwiftyJSOn

Project 29 - FullScreeniAd

Needed to implement a full screen iAd in my app and thought I would post a little project here too.

Utilized

  • Interstatial Ad

  • Delay of 1 second

Project 30 - SlideOutMenu

Drag across the screen to open up a menu.

Utilized

  • https://www.youtube.com/watch?v=8EFfPT3UeWs

  • SWRevealViewController