├── .gitignore ├── AlertControllers ├── AlertControllers.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── AlertControllers │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── AppLocalization ├── AppLocalization.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── AppLocalization │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── HomeScreenColor.colorset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── es.lproj │ ├── InfoPlist.strings │ ├── LaunchScreen.strings │ ├── Localizable.strings │ └── Main.strings │ ├── fr.lproj │ ├── InfoPlist.strings │ ├── LaunchScreen.strings │ ├── Localizable.strings │ └── Main.strings │ └── it.lproj │ ├── InfoPlist.strings │ ├── LaunchScreen.strings │ ├── Localizable.strings │ └── Main.strings ├── AppRotation ├── AppRotation.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── AppRotation │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── ButtonCenteredWithAnchors ├── ButtonCenteredWithAnchors.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ButtonCenteredWithAnchors │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Apple Blue.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── ButtonsInStackView ├── ButtonsInStackView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ButtonsInStackView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── AppleBookColor.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ ├── screenshot.png │ └── star.png ├── CenteredAutoLayoutButton ├── CenteredAutoLayoutButton.xcodeproj │ ├── project.pbxproj │ ├── project.pbxproj.old │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── CenteredAutoLayoutButton │ ├── AppColors.xcassets │ │ ├── AppleBlue.colorset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── Launch.storyboard │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── README.md └── docs │ └── am_i_centered2.png ├── CircleDrawingAnimation ├── CircleDrawingAnimation.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CircleDrawingAnimation │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Apple Messages.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CollectionViewBasic ├── CollectionViewBasic.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CollectionViewBasic │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── BasicCollectionViewController.swift │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CollectionViewDelegate ├── CollectionViewDelegate.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CollectionViewDelegate │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── BasicViewController.swift │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CollectionViewWithCustomCell ├── CollectionViewWithCustomCell.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CollectionViewWithCustomCell │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── BasicCollectionViewController.swift │ ├── CustomCollectionViewCell.swift │ ├── CustomCollectionViewCell.xib │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── Main.storyboard │ ├── README.md │ ├── ViewController.swift │ ├── fr_icon.png │ ├── it_icon.png │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CoreDataHighScores ├── CoreDataHighScores.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── CoreDataHighScores │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── AppleVideosColor.colorset │ │ └── Contents.json │ ├── ButtonHighlightColor.colorset │ │ └── Contents.json │ ├── Contents.json │ ├── dir_diag_on.imageset │ │ ├── Contents.json │ │ ├── dir_diag_on.png │ │ ├── dir_diag_on@2x.png │ │ └── dir_diag_on@3x.png │ ├── dir_left_up_on.imageset │ │ ├── Contents.json │ │ ├── dir_left_up_on.png │ │ ├── dir_left_up_on@2x.png │ │ └── dir_left_up_on@3x.png │ └── dir_right_down_on.imageset │ │ ├── Contents.json │ │ ├── dir_right_down_on.png │ │ ├── dir_right_down_on@2x.png │ │ └── dir_right_down_on@3x.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CoreDataHighScores.xcdatamodeld │ ├── .xccurrentversion │ └── CoreDataHighScores.xcdatamodel │ │ └── contents │ ├── HighScoreDAO.swift │ ├── HighScoreHeaderCell.swift │ ├── HighScoreTableViewCell.swift │ ├── HighScoreTableViewController.swift │ ├── Info.plist │ └── ViewController.swift ├── CountDownTimer ├── CountDownTimer.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CountDownTimer │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CustomTableViewHeaderCell ├── CustomTableViewHeaderCell.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── CustomTableViewHeaderCell │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomHeaderCell.swift │ ├── Info.plist │ ├── README.md │ ├── SimpleTableViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── CustomUIView ├── CustomUIView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── CustomUIView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomView.swift │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── GameClock ├── GameClock.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── GameClock │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── AppleVideosColor.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── GameClock.swift │ ├── GameClock.xcdatamodeld │ ├── .xccurrentversion │ └── GameClock.xcdatamodel │ │ └── contents │ ├── Info.plist │ ├── README.md │ └── ViewController.swift ├── GradientView ├── GradientView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── GradientView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── GradientView.swift │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── LICENSE ├── LabelAttributes ├── LabelAttributes.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── LabelAttributes │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Info.plist │ ├── LabelAttributes.xcdatamodeld │ │ ├── .xccurrentversion │ │ └── LabelAttributes.xcdatamodel │ │ │ └── contents │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ └── SceneDelegate.swift └── LabelAttributesTests │ ├── Info.plist │ └── LabelAttributesTests.swift ├── LineDrawingAnimation ├── LineDrawingAnimation.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── LineDrawingAnimation │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── AppleBlue.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── NavBarSearch ├── NavBarSearch.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── NavBarSearch │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── WordViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── NoNibAllCodeSwift ├── NoNibAllCodeSwift.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── NoNibAllCodeSwift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── Info.plist │ ├── README.md │ ├── SecondViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── PanGesture ├── PanGesture.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── PanGesture │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ └── ViewController.swift ├── PickerViewDemo ├── PickerViewDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── PickerViewDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── MyPickerView.swift │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── PlayAudio ├── PlayAudio.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── PlayAudio │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── robot02.mp3 │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── README.md ├── SegmentController ├── SegmentController.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SegmentController │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── ShapeLayer ├── ShapeLayer.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ShapeLayer │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── AppleBlue.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── ShowViewController ├── ShowViewController.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ShowViewController │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── SecondViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── SimpleTableView ├── SimpleTableView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── AppleVideosColor.colorset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── SimpleTableViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png └── SimpleTableViewController.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── SimpleUIViewSubclass ├── SimpleUIViewSubclass.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SimpleUIViewSubclass │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── SimpleView.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── StackViewsInStackViews ├── StackViewsInStackViews.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── StackViewsInStackViews │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── SwipeGesture ├── SwipeGesture.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SwipeGesture │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ └── ViewController.swift ├── SwitchController ├── SwitchController.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── SwitchController │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TableViewWithCustomCell ├── TableViewWithCustomCell.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TableViewWithCustomCell │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomTableViewCell.swift │ ├── CustomTableViewCell.xib │ ├── Info.plist │ ├── README.md │ ├── SimpleTableViewController.swift │ ├── ViewController.swift │ ├── fr_icon.png │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TableViewWithIndex ├── TableViewWithIndex.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TableViewWithIndex │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── SimpleTableViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TableViewWithSections ├── TableViewWithSections.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TableViewWithSections │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── SimpleTableViewController.swift │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TapGesture ├── TapGesture.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TapGesture │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TransitionWithView ├── README.md ├── TransitionWithView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── TransitionWithView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png └── TransitionWithViewTests │ ├── Info.plist │ └── TransitionWithViewTests.swift ├── TransitionWithViewAndLabels ├── README.md ├── TransitionWithViewAndLabels.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── TransitionWithViewAndLabels │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── TransitionWithViewAndLabelsTests │ ├── Info.plist │ └── TransitionWithViewAndLabelsTests.swift └── docs │ ├── curl_up_with_centered_label.png │ └── curl_up_with_centered_label_small.png ├── TwoButtonsInStackView ├── TwoButtonsInStackView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── TwoButtonsInStackView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Apple News.colorset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── ViewTransforms ├── ViewTransforms.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ViewTransforms │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ ├── screenshot-small.png │ ├── screenshot-toc.png │ └── screenshot.png ├── WebView ├── WebView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── WebView │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── README.md │ ├── ViewController.swift │ └── privacy.html └── screenshots.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/screenshots 64 | 65 | .DS_Store 66 | 67 | -------------------------------------------------------------------------------- /AlertControllers/AlertControllers.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AlertControllers/AlertControllers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AlertControllers/AlertControllers/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /AlertControllers/AlertControllers/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## UIAlertController 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | 14 | ``` 15 | 16 | ### Additional Functions 17 | ```swift 18 | // 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /AlertControllers/AlertControllers/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/AlertControllers/AlertControllers/screenshot-small.png -------------------------------------------------------------------------------- /AlertControllers/AlertControllers/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/AlertControllers/AlertControllers/screenshot-toc.png -------------------------------------------------------------------------------- /AlertControllers/AlertControllers/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/AlertControllers/AlertControllers/screenshot.png -------------------------------------------------------------------------------- /AppLocalization/AppLocalization.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/Assets.xcassets/HomeScreenColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "90", 13 | "alpha" : "1.000", 14 | "blue" : "250", 15 | "green" : "200" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/es.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/es.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Hello" = "Hola"; 3 | 4 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/es.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/fr.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/fr.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Hello" = "Bonjour"; 3 | 4 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/fr.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/it.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* No Localized Strings */ 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/it.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/it.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* No comment provided by engineer. */ 2 | "Hello" = "BonjorNo"; 3 | 4 | -------------------------------------------------------------------------------- /AppLocalization/AppLocalization/it.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /AppRotation/AppRotation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppRotation/AppRotation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppRotation/AppRotation/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AppRotation/AppRotation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AppRotation/AppRotation/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AppRotation 4 | // 5 | // Created by Michael Mellinger on 9/3/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | let widthLabel = UILabel() 13 | let heightLabel = UILabel() 14 | let stackView = UIStackView() 15 | 16 | func buildView() { 17 | [widthLabel, heightLabel, stackView].forEach({$0.translatesAutoresizingMaskIntoConstraints = false}) 18 | 19 | // [widthLabel,heightLabel].forEach(stackView.addArrangedSubview) 20 | stackView.addArrangedSubview(widthLabel) 21 | stackView.addArrangedSubview(heightLabel) 22 | 23 | stackView.axis = .horizontal 24 | stackView.distribution = .equalSpacing 25 | 26 | widthLabel.text = "0" 27 | heightLabel.text = "Rotate screen" 28 | 29 | self.view.addSubview(stackView) 30 | 31 | } 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | 35 | buildView() 36 | } 37 | 38 | } 39 | 40 | extension ViewController { 41 | 42 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 43 | super.viewWillTransition(to: size, with: coordinator) 44 | print("\(self) \(#function)") 45 | // let transitionToWide = size.width > size.height 46 | let w = size.width 47 | let h = size.height 48 | 49 | print("\nToSize: \(w), \(h)\n") 50 | self.view.backgroundColor = self.view.backgroundColor == .red ? UIColor.green : UIColor.red 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/Assets.xcassets/Apple Blue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : 0, 13 | "alpha" : 1, 14 | "blue" : 1, 15 | "green" : 0.47843 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## UIButton Centered with iOS9 Anchors 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | private let button = UIButton() 14 | 15 | private func addButton() { 16 | 17 | button.translatesAutoresizingMaskIntoConstraints = false 18 | button.titleLabel?.font = UIFont.systemFont(ofSize: 36) 19 | 20 | button.setTitle("Am I centered?", for: .normal) 21 | button.setTitleColor(.black, for: .normal) 22 | button.addTarget(self, action: #selector(pressed(_:)), for: .touchUpInside) 23 | 24 | view.addSubview(button) 25 | 26 | NSLayoutConstraint.activate([ 27 | button.centerXAnchor.constraint(equalTo: view.centerXAnchor), 28 | button.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0) 29 | ]) 30 | 31 | } 32 | ``` 33 | 34 | ### Additional Functions 35 | ```swift 36 | // 37 | ``` 38 | 39 | 40 | -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot-small.png -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot-toc.png -------------------------------------------------------------------------------- /ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonCenteredWithAnchors/ButtonCenteredWithAnchors/screenshot.png -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/Assets.xcassets/AppleBookColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0xFF", 13 | "alpha" : "1.000", 14 | "blue" : "0x00", 15 | "green" : "0x95" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Buttons in StackView 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ```swift 11 | 12 | ``` 13 | 14 | ### Important Functions 15 | ```swift 16 | private func buildView() {...} 17 | 18 | ``` 19 | 20 | 21 | 22 | ### Additional Functions 23 | ```swift 24 | // 25 | ``` 26 | -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonsInStackView/ButtonsInStackView/screenshot-small.png -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonsInStackView/ButtonsInStackView/screenshot-toc.png -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonsInStackView/ButtonsInStackView/screenshot.png -------------------------------------------------------------------------------- /ButtonsInStackView/ButtonsInStackView/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ButtonsInStackView/ButtonsInStackView/star.png -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/AppColors.xcassets/AppleBlue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0x00", 13 | "alpha" : "1.000", 14 | "blue" : "0xFF", 15 | "green" : "0x7A" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/AppColors.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CenteredAutoLayoutButton 4 | // 5 | // Created by Michael Mellinger on 8/14/14. 6 | // 7 | 8 | import UIKit 9 | 10 | @UIApplicationMain 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillEnterForeground(_ application: UIApplication) { 23 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 24 | } 25 | 26 | func applicationDidBecomeActive(_ application: UIApplication) { 27 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 28 | } 29 | 30 | func applicationWillTerminate(_ application: UIApplication) { 31 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/Launch.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## AutoLayout Centered Button 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | Use centerXAnchor and centerYAnchor 10 | 11 | ### Important Functions 12 | 13 | ```swift 14 | NSLayoutConstraint.activate([ 15 | button.centerXAnchor.constraint(equalTo: view.centerXAnchor), 16 | button.centerYAnchor.constraint(equalTo: view.centerYAnchor), 17 | 18 | button.widthAnchor.constraint(equalToConstant: 130), 19 | ]) 20 | 21 | ``` 22 | 23 | 24 | -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot-small.png -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot-toc.png -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CenteredAutoLayoutButton/CenteredAutoLayoutButton/screenshot.png -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/README.md: -------------------------------------------------------------------------------- 1 | Centered Button with Autolayout 2 | =============================== 3 | 4 | Create button programmatically (i.e. no storyboards) and added it with Autolayout. 5 | 6 | ![View](docs/am_i_centered2.png) -------------------------------------------------------------------------------- /CenteredAutoLayoutButton/docs/am_i_centered2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CenteredAutoLayoutButton/docs/am_i_centered2.png -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/Assets.xcassets/Apple Messages.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : 0.2980392157, 13 | "alpha" : 1, 14 | "blue" : 0.3921568627, 15 | "green" : 0.8509803922 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/README.md: -------------------------------------------------------------------------------- 1 | ## Circle Drawing Animation 2 | Menu: [Tutorial Home](../../README.md) 3 | 4 | ![Screenshot](screenshot-small.png) 5 | 6 | ## Overview 7 | 8 | 9 | ```swift 10 | ``` 11 | 12 | ## Important Functions 13 | 14 | ### Additional Functions 15 | 16 | 17 | ### The Details 18 | -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CircleDrawingAnimation/CircleDrawingAnimation/screenshot-small.png -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CircleDrawingAnimation/CircleDrawingAnimation/screenshot-toc.png -------------------------------------------------------------------------------- /CircleDrawingAnimation/CircleDrawingAnimation/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CircleDrawingAnimation/CircleDrawingAnimation/screenshot.png -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Basic UICollectionViewController 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | Must create with a FlowLayout if we create UICollectionViewController programatically 13 | 14 | ```swift 15 | 16 | let flowLayout=UICollectionViewFlowLayout() 17 | flowLayout.itemSize = CGSizeMake(100, 100) 18 | flowLayout.minimumInteritemSpacing = 2 19 | flowLayout.minimumLineSpacing = 5 20 | flowLayout.scrollDirection = .Vertical 21 | 22 | collectionViewController = BasicCollectionViewController(collectionViewLayout: flowLayout) 23 | 24 | ``` 25 | 26 | ### Important Functions 27 | 28 | ```swift 29 | self.collectionView!.register(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier) 30 | ``` 31 | ### Additional Functions 32 | ```swift 33 | // 34 | ``` 35 | 36 | 37 | * The Details 38 | -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewBasic/CollectionViewBasic/screenshot-small.png -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewBasic/CollectionViewBasic/screenshot-toc.png -------------------------------------------------------------------------------- /CollectionViewBasic/CollectionViewBasic/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewBasic/CollectionViewBasic/screenshot.png -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Basic UICollectionView Delegate 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | Must create with a FlowLayout if we create UICollectionViewController programatically 13 | 14 | ```swift 15 | 16 | let flowLayout=UICollectionViewFlowLayout() 17 | flowLayout.itemSize = CGSizeMake(100, 100) 18 | flowLayout.minimumInteritemSpacing = 2 19 | flowLayout.minimumLineSpacing = 5 20 | flowLayout.scrollDirection = .Vertical 21 | 22 | collectionViewController = BasicCollectionViewController(collectionViewLayout: flowLayout) 23 | 24 | ``` 25 | 26 | ### Important Functions 27 | 28 | ```swift 29 | // 30 | ``` 31 | ### Additional Functions 32 | ```swift 33 | // 34 | ``` 35 | 36 | 37 | * The Details 38 | -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CollectionViewDelegate 4 | // 5 | // Created by Michael Mellinger on 5/25/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | private var collectionViewController = BasicCollectionViewController() 13 | 14 | // MARK: - Build View 15 | 16 | private func addCollectionView() { 17 | 18 | collectionViewController.view.translatesAutoresizingMaskIntoConstraints = false 19 | 20 | view.addSubview(collectionViewController.view) 21 | 22 | let guide = view.safeAreaLayoutGuide 23 | 24 | NSLayoutConstraint.activate([ 25 | collectionViewController.view.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 26 | collectionViewController.view.bottomAnchor.constraint(equalTo: guide.bottomAnchor), 27 | collectionViewController.view.leftAnchor.constraint(equalTo: guide.leftAnchor, constant: 5), 28 | collectionViewController.view.rightAnchor.constraint(equalTo: guide.rightAnchor, constant: -5), 29 | ]) 30 | } 31 | 32 | // MARK: - View Management 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | 37 | view.backgroundColor = .purple 38 | navigationController?.navigationBar.prefersLargeTitles = true 39 | self.title = "Collection Delegate" 40 | 41 | addCollectionView() 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewDelegate/CollectionViewDelegate/screenshot-small.png -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewDelegate/CollectionViewDelegate/screenshot-toc.png -------------------------------------------------------------------------------- /CollectionViewDelegate/CollectionViewDelegate/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewDelegate/CollectionViewDelegate/screenshot.png -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "83.5x83.5", 66 | "scale" : "2x" 67 | } 68 | ], 69 | "info" : { 70 | "version" : 1, 71 | "author" : "xcode" 72 | } 73 | } -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/CustomCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomCollectionViewCell.swift 3 | // CollectionViewWithCustomCell 4 | // 5 | // Created by Michael Mellinger on 5/26/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class CustomCollectionViewCell: UICollectionViewCell { 11 | 12 | 13 | @IBOutlet weak var imageView: UIImageView! 14 | @IBOutlet weak var wordLabel:UILabel! 15 | 16 | override func awakeFromNib() { 17 | super.awakeFromNib() 18 | // Initialization code 19 | } 20 | 21 | override init(frame: CGRect) { 22 | 23 | super.init(frame:frame) 24 | } 25 | 26 | required init?(coder aDecoder: NSCoder) { 27 | super.init(coder: aDecoder) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## UICollectionView with Custom Cell 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | 13 | ### Register Nib 14 | ```swift 15 | self.collectionView!.register(UINib(nibName:"CustomCollectionViewCell", bundle:Bundle.main), forCellWithReuseIdentifier:reuseIdentifier) 16 | ``` 17 | 18 | 19 | ### Register Class 20 | ```swift 21 | self.collectionView!.registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier) 22 | ``` 23 | 24 | ## Delegate Functions 25 | ```swift 26 | ``` 27 | 28 | 29 | 30 | * The Details 31 | 32 | ```swift 33 | ``` 34 | 35 | -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/fr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewWithCustomCell/CollectionViewWithCustomCell/fr_icon.png -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/it_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewWithCustomCell/CollectionViewWithCustomCell/it_icon.png -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot-small.png -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot-toc.png -------------------------------------------------------------------------------- /CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CollectionViewWithCustomCell/CollectionViewWithCustomCell/screenshot.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/AppleVideosColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "90", 13 | "alpha" : "1.000", 14 | "blue" : "250", 15 | "green" : "200" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/ButtonHighlightColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0x00", 13 | "alpha" : "1.000", 14 | "blue" : "0xFF", 15 | "green" : "0x7A" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "dir_diag_on.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "dir_diag_on@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "dir_diag_on@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on@2x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_diag_on.imageset/dir_diag_on@3x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "dir_left_up_on.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "dir_left_up_on@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "dir_left_up_on@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on@2x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_left_up_on.imageset/dir_left_up_on@3x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "dir_right_down_on.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "dir_right_down_on@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "dir_right_down_on@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on@2x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CoreDataHighScores/CoreDataHighScores/Assets.xcassets/dir_right_down_on.imageset/dir_right_down_on@3x.png -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/CoreDataHighScores.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | CoreDataHighScores.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /CoreDataHighScores/CoreDataHighScores/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Countdown Timer 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | ``` 14 | 15 | ### Important Functions 16 | 17 | ### The Details 18 | 19 | -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CountDownTimer/CountDownTimer/screenshot-small.png -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CountDownTimer/CountDownTimer/screenshot-toc.png -------------------------------------------------------------------------------- /CountDownTimer/CountDownTimer/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CountDownTimer/CountDownTimer/screenshot.png -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/README.md: -------------------------------------------------------------------------------- 1 | 2 | Menu: [Home](../../README.md) 3 | 4 | ## Custom UITableView Header 5 | 6 | ![Screenshot](screenshot-small.png) 7 | 8 | ### Overview 9 | Subclass UIView 10 | 11 | 12 | ### Important Functions 13 | 14 | ### Required TableView Delegate Functions 15 | ```swift 16 | override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { 17 | 18 | let header = CustomTableViewHeaderCell() 19 | 20 | header.backgroundColor = UIColor(red: 90/255.0, green: 200.0/255.0, blue: 250.0/255, alpha: 1.0) // Apple Videos 21 | 22 | header.label1.text = "Column 1" 23 | header.label2.text = "Column 2" 24 | return header 25 | } 26 | ``` 27 | 28 | 29 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SimpleTableView 4 | // 5 | // Created by Michael Mellinger on 3/8/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | private let tableViewController = SimpleTableViewController() 13 | 14 | // MARK: - Build View 15 | 16 | private func addTableView() { 17 | 18 | tableViewController.tableView.translatesAutoresizingMaskIntoConstraints = false 19 | 20 | view.addSubview(tableViewController.tableView) 21 | 22 | let guide = view.safeAreaLayoutGuide 23 | 24 | NSLayoutConstraint.activate([ 25 | 26 | tableViewController.tableView.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 27 | tableViewController.tableView.bottomAnchor.constraint(equalToSystemSpacingBelow: guide.bottomAnchor, multiplier: 1.0), 28 | tableViewController.tableView.leftAnchor.constraint(equalTo: guide.leftAnchor, constant: 0), 29 | tableViewController.tableView.rightAnchor.constraint(equalTo: guide.rightAnchor, constant: 0), 30 | 31 | ]) 32 | 33 | } 34 | 35 | // MARK: - View Management 36 | 37 | override func viewDidLoad() { 38 | super.viewDidLoad() 39 | 40 | view.backgroundColor = .white 41 | 42 | navigationController?.navigationBar.prefersLargeTitles = true 43 | self.title = "Table Subclass" 44 | 45 | addTableView() 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot-small.png -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot-toc.png -------------------------------------------------------------------------------- /CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomTableViewHeaderCell/CustomTableViewHeaderCell/screenshot.png -------------------------------------------------------------------------------- /CustomUIView/CustomUIView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CustomUIView/CustomUIView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Simple Custom UIView Subclass 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | Sets background color in init() and draws a rectangle 10 | 11 | ```swift 12 | 13 | ``` 14 | 15 | ### Important Functions 16 | 17 | 18 | ### Additional Functions 19 | 20 | 21 | ### The Details 22 | -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CustomUIView 4 | // 5 | // Created by Michael Mellinger on 6/2/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | let customView = CustomView() 13 | 14 | 15 | func addCustomView() { 16 | 17 | customView.translatesAutoresizingMaskIntoConstraints = false 18 | 19 | self.view.addSubview(customView) 20 | 21 | let width:CGFloat = 300 // Change me 22 | NSLayoutConstraint.activate([ 23 | 24 | customView.centerXAnchor.constraint(equalTo: view.centerXAnchor), 25 | customView.centerYAnchor.constraint(equalTo: view.centerYAnchor), 26 | 27 | customView.widthAnchor.constraint(equalToConstant: width), 28 | customView.heightAnchor.constraint(equalToConstant: width), 29 | ]) 30 | // customView.backgroundColor = .purpleColor() 31 | } 32 | 33 | override func viewDidLoad() { 34 | super.viewDidLoad() 35 | 36 | addCustomView() 37 | } 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomUIView/CustomUIView/screenshot-small.png -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomUIView/CustomUIView/screenshot-toc.png -------------------------------------------------------------------------------- /CustomUIView/CustomUIView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/CustomUIView/CustomUIView/screenshot.png -------------------------------------------------------------------------------- /GameClock/GameClock.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GameClock/GameClock.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GameClock/GameClock.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /GameClock/GameClock/Assets.xcassets/AppleVideosColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "90", 13 | "alpha" : "1.000", 14 | "blue" : "250", 15 | "green" : "200" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /GameClock/GameClock/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /GameClock/GameClock/GameClock.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | GameClock.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /GameClock/GameClock/GameClock.xcdatamodeld/GameClock.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /GameClock/GameClock/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /GameClock/GameClock/README.md: -------------------------------------------------------------------------------- 1 | ## Game Clock 2 | 3 | 4 | -------------------------------------------------------------------------------- /GradientView/GradientView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GradientView/GradientView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GradientView/GradientView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /GradientView/GradientView/GradientView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GradientView.swift 3 | // GradientView 4 | // 5 | // Created by Michael Mellinger on 9/4/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class GradientView: UIView { 11 | 12 | override init(frame: CGRect) { 13 | super.init(frame: frame) 14 | //self.backgroundColor = UIColor.purple // Also, set solid color in init() 15 | 16 | let layer = CAGradientLayer() 17 | 18 | layer.colors = [UIColor.red.cgColor, UIColor.blue.cgColor, UIColor.green.cgColor] 19 | layer.frame = self.bounds // full view 20 | self.layer.addSublayer(layer) 21 | } 22 | 23 | required init?(coder aDecoder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GradientView/GradientView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /GradientView/GradientView/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Gradient View 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | 14 | 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /GradientView/GradientView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // GradientView 4 | // 5 | // Created by Michael Mellinger on 9/4/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | // MARK: - Build View 13 | 14 | private func buildView() { 15 | let v = GradientView(frame: view.bounds) 16 | view.addSubview(v) 17 | } 18 | 19 | // MARK: - View Management 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | buildView() 25 | 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /GradientView/GradientView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/GradientView/GradientView/screenshot-small.png -------------------------------------------------------------------------------- /GradientView/GradientView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/GradientView/GradientView/screenshot-toc.png -------------------------------------------------------------------------------- /GradientView/GradientView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/GradientView/GradientView/screenshot.png -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // LabelAttributes 4 | // 5 | // Created by Michael Mellinger on 4/30/20. 6 | // Copyright © 2020 h4labs. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | var body: some View { 13 | Text("Hello, World!") 14 | } 15 | } 16 | 17 | struct ContentView_Previews: PreviewProvider { 18 | static var previews: some View { 19 | ContentView() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes/LabelAttributes.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | LabelAttributes.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes/LabelAttributes.xcdatamodeld/LabelAttributes.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributes/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributesTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LabelAttributes/LabelAttributesTests/LabelAttributesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LabelAttributesTests.swift 3 | // LabelAttributesTests 4 | // 5 | // Created by Michael Mellinger on 4/30/20. 6 | // Copyright © 2020 h4labs. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import LabelAttributes 11 | 12 | class LabelAttributesTests: XCTestCase { 13 | 14 | override func setUpWithError() throws { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDownWithError() throws { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() throws { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() throws { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/Assets.xcassets/AppleBlue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0", 13 | "alpha" : "1.000", 14 | "blue" : "255", 15 | "green" : "122" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/README.md: -------------------------------------------------------------------------------- 1 | ## Line Drawing Animation 2 | 3 | Menu: [Tutorial Home](../../README.md) 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ```swift 11 | ``` 12 | 13 | ### Important Functions 14 | 15 | ### Additional Functions 16 | 17 | 18 | ###The Details 19 | -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/LineDrawingAnimation/LineDrawingAnimation/screenshot-small.png -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/LineDrawingAnimation/LineDrawingAnimation/screenshot-toc.png -------------------------------------------------------------------------------- /LineDrawingAnimation/LineDrawingAnimation/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/LineDrawingAnimation/LineDrawingAnimation/screenshot.png -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Navigation Search Bar 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | 11 | ```swift 12 | 13 | ``` 14 | 15 | 16 | -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NavBarSearch/NavBarSearch/screenshot-small.png -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NavBarSearch/NavBarSearch/screenshot-toc.png -------------------------------------------------------------------------------- /NavBarSearch/NavBarSearch/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NavBarSearch/NavBarSearch/screenshot.png -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Example iOS Project without Storyboards 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | Example iOS Project without Storyboards. 13 | 1. Create a Single View Application 14 | 2. Remove Main.storyboard from the Target 15 | 3. Add a few lines to the AppDelegate didFinishLaunchingWithOptions: 16 | ```swift 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | 19 | self.window = UIWindow(frame: UIScreen.main.bounds) 20 | let navController = UINavigationController() 21 | self.window?.rootViewController = navController 22 | let topLevelController = ViewController() 23 | navController.addChildViewController(topLevelController) 24 | 25 | self.window?.makeKeyAndVisible() 26 | 27 | return true 28 | } 29 | 30 | ``` 31 | 32 | 4. Manage push and popping of ViewControllers. 33 | ```swift 34 | func nextController(_ sender:UIButton) { 35 | let secondViewController = SecondViewController() 36 | 37 | self.navigationController?.pushViewController(secondViewController, animated: true) 38 | } 39 | ``` 40 | 41 | ```swift 42 | func previousController(_ sender:UIButton) { 43 | 44 | _ = self.navigationController?.popViewController(animated: true) 45 | } 46 | ``` 47 | 48 | 49 | -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // ShowViewController 4 | // 5 | // Created by Michael Mellinger on 12/16/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class SecondViewController: UIViewController { 11 | 12 | let button = UIButton() 13 | 14 | @objc func previousController(_ sender:UIButton) { 15 | 16 | _ = self.navigationController?.popViewController(animated: true) 17 | } 18 | 19 | func buildView() { 20 | 21 | button.translatesAutoresizingMaskIntoConstraints = false 22 | button.setTitle("Back", for: .normal) 23 | 24 | self.view.addSubview(button) 25 | 26 | button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 27 | button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 28 | 29 | button.addTarget(self, action: #selector(previousController(_:)), for: .touchUpInside) 30 | } 31 | 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | 35 | self.view.backgroundColor = .orange 36 | 37 | buildView() 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot-small.png -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot-toc.png -------------------------------------------------------------------------------- /NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/NoNibAllCodeSwift/NoNibAllCodeSwift/screenshot.png -------------------------------------------------------------------------------- /PanGesture/PanGesture.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PanGesture/PanGesture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PanGesture/PanGesture/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /PanGesture/PanGesture/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /PanGesture/PanGesture/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Pan Gesture 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | ``` 14 | 15 | ### Important Functions 16 | 17 | ```swift 18 | ``` 19 | 20 | ### Additional Functions 21 | ```swift 22 | ``` 23 | 24 | 25 | ### The Details 26 | -------------------------------------------------------------------------------- /PanGesture/PanGesture/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // PanGesture 4 | // 5 | // Created by Michael Mellinger on 5/27/16. 6 | // Copyright © 2016 Michael Mellinger. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/MyPickerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyPickerView.swift 3 | // PickerViewDemo 4 | // 5 | import UIKit 6 | 7 | class MyPickerView: NSObject, UIPickerViewDataSource, UIPickerViewDelegate { 8 | 9 | let pickerDataSource = ["10", "20", "50", "100", "500"] 10 | let pickerMap = [10, 20, 50, 100, 500] 11 | 12 | // MARK: - PickerView Datasource 13 | 14 | func numberOfComponents(in pickerView: UIPickerView) -> Int { 15 | return 1 16 | } 17 | 18 | func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { 19 | return pickerDataSource.count 20 | } 21 | 22 | func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { 23 | return pickerDataSource[row] 24 | } 25 | 26 | func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) 27 | { 28 | 29 | let i = pickerMap[row] 30 | print(i) 31 | } 32 | 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## PickerView 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | ``` 14 | 15 | 16 | ### Additional Functions 17 | ```swift 18 | ``` 19 | 20 | 21 | ### The Details 22 | -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PickerViewDemo/PickerViewDemo/screenshot-small.png -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PickerViewDemo/PickerViewDemo/screenshot-toc.png -------------------------------------------------------------------------------- /PickerViewDemo/PickerViewDemo/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PickerViewDemo/PickerViewDemo/screenshot.png -------------------------------------------------------------------------------- /PlayAudio/PlayAudio.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PlayAudio/PlayAudio.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Play Audio 4 | 5 | ## TODO 6 | 7 | - Fix 8 | ```swift 9 | // try! AVAudioSession.sharedInstance().setCategory(convertFromAVAudioSessionCategory(AVAudioSession.Category.playback), with: []) 10 | ``` 11 | ![Screenshot](screenshot-small.png) 12 | 13 | ### Overview 14 | 15 | 16 | ### Important Functions 17 | 18 | ```swift 19 | ``` 20 | 21 | ### Additional Functions 22 | ```swift 23 | ``` 24 | 25 | 26 | ### The Details 27 | -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/robot02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PlayAudio/PlayAudio/robot02.mp3 -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PlayAudio/PlayAudio/screenshot-small.png -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PlayAudio/PlayAudio/screenshot-toc.png -------------------------------------------------------------------------------- /PlayAudio/PlayAudio/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/PlayAudio/PlayAudio/screenshot.png -------------------------------------------------------------------------------- /SegmentController/SegmentController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SegmentController/SegmentController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SegmentController/SegmentController/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SegmentController/SegmentController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /SegmentController/SegmentController/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Tutorial Home](../../README.md) 2 | 3 | ![Screenshot](screenshot-small.png) 4 | 5 | 6 | ## TODO 7 | - 8 | 9 | ### Overview 10 | 11 | 12 | ### Important Functions 13 | 14 | -------------------------------------------------------------------------------- /SegmentController/SegmentController/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SegmentController/SegmentController/screenshot-small.png -------------------------------------------------------------------------------- /SegmentController/SegmentController/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SegmentController/SegmentController/screenshot-toc.png -------------------------------------------------------------------------------- /SegmentController/SegmentController/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SegmentController/SegmentController/screenshot.png -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/Assets.xcassets/AppleBlue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0", 13 | "alpha" : "1.000", 14 | "blue" : "255", 15 | "green" : "122" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Tutorial Home](../../README.md) 2 | 3 | ## CAShapeLayer 4 | 5 | 6 | ![Screenshot](screenshot-small.png) 7 | 8 | ### Overview 9 | 10 | 11 | ### Important Functions 12 | 13 | ```swift 14 | ``` 15 | 16 | 17 | -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShapeLayer/ShapeLayer/screenshot-small.png -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShapeLayer/ShapeLayer/screenshot-toc.png -------------------------------------------------------------------------------- /ShapeLayer/ShapeLayer/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShapeLayer/ShapeLayer/screenshot.png -------------------------------------------------------------------------------- /ShowViewController/ShowViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Programmatically Push View Controller 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | 13 | #### Important: In your Main.storyboard, you must embed the first ViewContrller in a Navigation Controller. 14 | ``` 15 | Editor -> Embed In -> Navigation Controller 16 | ``` 17 | ### Manage push and popping of ViewControllers. 18 | 19 | ```swift 20 | func nextController(_ sender:UIButton) { 21 | let secondViewController = SecondViewController() 22 | 23 | self.navigationController?.pushViewController(secondViewController, animated: true) 24 | } 25 | ``` 26 | 27 | ```swift 28 | func previousController(_ sender:UIButton) { 29 | 30 | _ = self.navigationController?.popViewController(animated: true) 31 | } 32 | ``` 33 | 34 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // ShowViewController 4 | // 5 | // Created by Michael Mellinger on 12/16/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class SecondViewController: UIViewController { 11 | 12 | let button = UIButton() 13 | 14 | /* 15 | 16 | Dismiss Modal: https://developer.apple.com/reference/uikit/uiviewcontroller/1621505-dismiss 17 | */ 18 | @objc func previousController(_ sender:UIButton) { 19 | 20 | _ = self.navigationController?.popViewController(animated: true) 21 | } 22 | 23 | func buildView() { 24 | 25 | button.translatesAutoresizingMaskIntoConstraints = false 26 | button.setTitle("Back", for: .normal) 27 | 28 | self.view.addSubview(button) 29 | 30 | button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 31 | button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 32 | 33 | button.addTarget(self, action: #selector(previousController(_:)), for: .touchUpInside) 34 | } 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | 39 | self.view.backgroundColor = .orange 40 | 41 | buildView() 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ShowViewController 4 | // 5 | // Created by Michael Mellinger on 12/16/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | let button = UIButton() 13 | 14 | /* 15 | https://developer.apple.com/reference/uikit/uiviewcontroller/1621377-show 16 | 17 | */ 18 | @objc func nextController(_ sender:UIButton) { 19 | let secondViewController = SecondViewController() 20 | 21 | self.navigationController?.pushViewController(secondViewController, animated: true) 22 | 23 | // self.show(secondViewController, sender: self) 24 | } 25 | 26 | func buildView() { 27 | 28 | button.translatesAutoresizingMaskIntoConstraints = false 29 | button.setTitle("Next Controller", for: .normal) 30 | 31 | self.view.addSubview(button) 32 | 33 | button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor).isActive = true 34 | button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true 35 | 36 | button.addTarget(self, action: #selector(nextController(_:)), for: .touchUpInside) 37 | } 38 | 39 | override func viewDidLoad() { 40 | super.viewDidLoad() 41 | self.view.backgroundColor = .purple 42 | self.title = "Programatic ViewController Push" 43 | buildView() 44 | } 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShowViewController/ShowViewController/screenshot-small.png -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShowViewController/ShowViewController/screenshot-toc.png -------------------------------------------------------------------------------- /ShowViewController/ShowViewController/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ShowViewController/ShowViewController/screenshot.png -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/Assets.xcassets/AppleVideosColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "90", 13 | "alpha" : "1.000", 14 | "blue" : "250", 15 | "green" : "200" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SimpleTableView 4 | // 5 | // Created by Michael Mellinger on 3/8/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | private let tableViewController = SimpleTableViewController() 13 | 14 | // MARK: - Build View 15 | 16 | private func addTableView() { 17 | 18 | tableViewController.tableView.translatesAutoresizingMaskIntoConstraints = false 19 | 20 | view.addSubview(tableViewController.tableView) 21 | 22 | let guide = view.safeAreaLayoutGuide 23 | 24 | NSLayoutConstraint.activate([ 25 | tableViewController.tableView.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 26 | tableViewController.tableView.bottomAnchor.constraint(equalToSystemSpacingBelow: guide.bottomAnchor, multiplier: 1.0), 27 | tableViewController.tableView.leftAnchor.constraint(equalTo: guide.leftAnchor, constant: 0), 28 | tableViewController.tableView.rightAnchor.constraint(equalTo: guide.rightAnchor, constant: 0), 29 | 30 | ]) 31 | 32 | } 33 | 34 | // MARK: - View Management 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | 39 | view.backgroundColor = UIColor(named: "AppleVideosColor") 40 | 41 | navigationController?.navigationBar.prefersLargeTitles = true 42 | self.title = "Table Subclass" 43 | 44 | addTableView() 45 | } 46 | 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleTableView/SimpleTableView/screenshot-small.png -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleTableView/SimpleTableView/screenshot-toc.png -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleTableView/SimpleTableView/screenshot.png -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SimpleTableView/SimpleTableViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Simple UIView Subclass 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | + Set subview background color 13 | + Use iOS9 autolayout anchors to position 14 | 15 | ```swift 16 | 17 | 18 | ``` 19 | 20 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/SimpleView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleView.swift 3 | // SimpleUIViewSubclass 4 | // 5 | // Created by Michael Mellinger on 10/7/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class SimpleView: UIView { 11 | 12 | override init(frame: CGRect) { 13 | super.init(frame: frame) 14 | self.backgroundColor = UIColor.purple 15 | } 16 | 17 | required init?(coder aDecoder: NSCoder) { 18 | fatalError("init(coder:) has not been implemented") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SimpleUIViewSubclass 4 | // 5 | // Created by Michael Mellinger on 10/7/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | private let simpleView = SimpleView() 13 | 14 | // MARK: - Build View 15 | 16 | private func buildView() { 17 | simpleView.translatesAutoresizingMaskIntoConstraints = false 18 | 19 | view.addSubview(simpleView) 20 | 21 | let guide = view.safeAreaLayoutGuide 22 | 23 | NSLayoutConstraint.activate([ 24 | simpleView.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 25 | simpleView.bottomAnchor.constraint(equalTo: guide.bottomAnchor, constant: -20), 26 | simpleView.leadingAnchor.constraint(equalTo: guide.leadingAnchor, constant: 10), 27 | simpleView.trailingAnchor.constraint(equalTo: guide.trailingAnchor, constant: -10), 28 | ]) 29 | 30 | } 31 | 32 | // MARK: - View Management 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | 37 | view.backgroundColor = .orange 38 | navigationController?.navigationBar.prefersLargeTitles = true 39 | self.title = "UIView Subclass" 40 | 41 | buildView() 42 | } 43 | 44 | override func didReceiveMemoryWarning() { 45 | super.didReceiveMemoryWarning() 46 | // Dispose of any resources that can be recreated. 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot-small.png -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot-toc.png -------------------------------------------------------------------------------- /SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SimpleUIViewSubclass/SimpleUIViewSubclass/screenshot.png -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## StackViews in StackView 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | ### TODO 10 | - Fix Layout deprecation 11 | 12 | ### Important Functions 13 | 14 | ```swift 15 | ``` 16 | 17 | ### Additional Functions 18 | ```swift 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/StackViewsInStackViews/StackViewsInStackViews/screenshot-small.png -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/StackViewsInStackViews/StackViewsInStackViews/screenshot-toc.png -------------------------------------------------------------------------------- /StackViewsInStackViews/StackViewsInStackViews/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/StackViewsInStackViews/StackViewsInStackViews/screenshot.png -------------------------------------------------------------------------------- /SwipeGesture/SwipeGesture.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwipeGesture/SwipeGesture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwipeGesture/SwipeGesture/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SwipeGesture/SwipeGesture/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## TapGesture 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | 13 | 14 | Change the view color when it's tapped 15 | 16 | ```swift 17 | 18 | 19 | `` 20 | 21 | -------------------------------------------------------------------------------- /SwipeGesture/SwipeGesture/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwipeGesture 4 | // 5 | // Created by Michael Mellinger on 5/27/16. 6 | // Copyright © 2016 Michael Mellinger. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /SwitchController/SwitchController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwitchController/SwitchController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwitchController/SwitchController/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SwitchController/SwitchController/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /SwitchController/SwitchController/README.md: -------------------------------------------------------------------------------- 1 | 2 | Menu: [[http://www.h4labs.com/dev/ios/swift.html][h4labs Swift]] | [[file:../../README.org][Tutorial Home]] 3 | 4 | [[screenshot-small.png]] 5 | 6 | ## TODO 7 | 8 | ## Overview 9 | 10 | 11 | ```swift 12 | 13 | ``` 14 | 15 | ## The Details 16 | -------------------------------------------------------------------------------- /SwitchController/SwitchController/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SwitchController/SwitchController/screenshot-small.png -------------------------------------------------------------------------------- /SwitchController/SwitchController/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SwitchController/SwitchController/screenshot-toc.png -------------------------------------------------------------------------------- /SwitchController/SwitchController/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/SwitchController/SwitchController/screenshot.png -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/CustomTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTableViewCell.swift 3 | // TableViewWithCustomCell 4 | // 5 | // Created by Michael Mellinger on 5/27/16. 6 | // Copyright © 2016 Michael Mellinger. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CustomTableViewCell: UITableViewCell { 12 | 13 | // A regular table cell already has an imageView so rename 14 | @IBOutlet weak var imageView1: UIImageView! 15 | 16 | @IBOutlet weak var label1: UILabel! 17 | @IBOutlet weak var label2: UILabel! 18 | 19 | override func awakeFromNib() { 20 | super.awakeFromNib() 21 | // Initialization code 22 | } 23 | 24 | override func setSelected(_ selected: Bool, animated: Bool) { 25 | super.setSelected(selected, animated: animated) 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## UITableView with Custom UITableViewCell 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | self.tableView.register(UINib(nibName: "CustomTableViewCell", bundle: nil), forCellReuseIdentifier: cellIdentifier) 14 | ``` 15 | 16 | I commonly create custom cells without Interface Builder (i.e. code only) then register the class 17 | 18 | ```swift 19 | self.tableView.register(CustomTableViewCell.self, forCellReuseIdentifier:cellIdentifier) 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SimpleTableView 4 | // 5 | // Created by Michael Mellinger on 3/8/16. 6 | // Copyright © 2016 h4labs. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | private let tableViewController = SimpleTableViewController() 14 | 15 | // MARK: - Build View 16 | 17 | private func addTableView() { 18 | 19 | tableViewController.tableView.translatesAutoresizingMaskIntoConstraints = false 20 | view.addSubview(tableViewController.tableView) 21 | 22 | let guide = view.safeAreaLayoutGuide 23 | 24 | NSLayoutConstraint.activate([ 25 | tableViewController.tableView.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 26 | tableViewController.tableView.bottomAnchor.constraint(equalToSystemSpacingBelow: guide.bottomAnchor, multiplier: 1.0), 27 | 28 | tableViewController.tableView.leftAnchor.constraint(equalTo: guide.leftAnchor, constant: 0), 29 | tableViewController.tableView.rightAnchor.constraint(equalTo: guide.rightAnchor, constant: 0), 30 | ]) 31 | } 32 | 33 | // MARK: - View Management 34 | 35 | override func viewDidLoad() { 36 | super.viewDidLoad() 37 | 38 | view.backgroundColor = .gray 39 | navigationController?.navigationBar.prefersLargeTitles = true 40 | self.title = "TableView/Custom Cell" 41 | addTableView() 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/fr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithCustomCell/TableViewWithCustomCell/fr_icon.png -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithCustomCell/TableViewWithCustomCell/screenshot-small.png -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithCustomCell/TableViewWithCustomCell/screenshot-toc.png -------------------------------------------------------------------------------- /TableViewWithCustomCell/TableViewWithCustomCell/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithCustomCell/TableViewWithCustomCell/screenshot.png -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## UITableViewController Subclass with Index 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | This example simply adds one additional function to the TableViewWithSections example: 13 | 14 | ```swift 15 | // Simply return the entire array: ["a", "b", "c", "d", "e", "f", "g", "m"] 16 | override func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? { 17 | 18 | return sectionIndex 19 | } 20 | 21 | ``` 22 | 23 | 24 | ### Important Functions 25 | 26 | ```swift 27 | // 28 | ``` 29 | 30 | 31 | 32 | ### Additional Functions 33 | ```swift 34 | // 35 | ``` 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TableViewWithIndex 4 | // 5 | // Created by Michael Mellinger on 3/9/16. 6 | // 7 | 8 | import UIKit 9 | 10 | class ViewController: UIViewController { 11 | 12 | private let tableViewController = SimpleTableViewController() 13 | 14 | // MARK: - Build View 15 | 16 | private func addTableView() { 17 | 18 | tableViewController.tableView.translatesAutoresizingMaskIntoConstraints = false 19 | 20 | view.addSubview(tableViewController.tableView) 21 | let guide = view.safeAreaLayoutGuide 22 | 23 | NSLayoutConstraint.activate([ 24 | tableViewController.tableView.topAnchor.constraint(equalToSystemSpacingBelow: guide.topAnchor, multiplier: 1.0), 25 | tableViewController.tableView.bottomAnchor.constraint(equalToSystemSpacingBelow: guide.bottomAnchor, multiplier: 1.0), 26 | tableViewController.tableView.leftAnchor.constraint(equalTo: guide.leftAnchor, constant: 0), 27 | tableViewController.tableView.rightAnchor.constraint(equalTo: guide.rightAnchor, constant: 0), 28 | 29 | ]) 30 | } 31 | 32 | // MARK: - View Management 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | 37 | navigationController?.navigationBar.prefersLargeTitles = true 38 | navigationItem.hidesSearchBarWhenScrolling = false 39 | 40 | self.title = "Table Subclass/Index" 41 | view.backgroundColor = .gray 42 | 43 | addTableView() 44 | } 45 | 46 | } 47 | 48 | -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithIndex/TableViewWithIndex/screenshot-small.png -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithIndex/TableViewWithIndex/screenshot-toc.png -------------------------------------------------------------------------------- /TableViewWithIndex/TableViewWithIndex/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithIndex/TableViewWithIndex/screenshot.png -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithSections/TableViewWithSections/screenshot-small.png -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithSections/TableViewWithSections/screenshot-toc.png -------------------------------------------------------------------------------- /TableViewWithSections/TableViewWithSections/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TableViewWithSections/TableViewWithSections/screenshot.png -------------------------------------------------------------------------------- /TapGesture/TapGesture.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TapGesture/TapGesture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TapGesture/TapGesture/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TapGesture/TapGesture/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## TapGesture 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ## TODO 8 | - 9 | 10 | ### Overview 11 | 12 | 13 | ### Important Functions 14 | 15 | 16 | 17 | Change the view color when it's tapped 18 | 19 | ```swift 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /TapGesture/TapGesture/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TapGesture/TapGesture/screenshot-small.png -------------------------------------------------------------------------------- /TapGesture/TapGesture/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TapGesture/TapGesture/screenshot-toc.png -------------------------------------------------------------------------------- /TapGesture/TapGesture/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TapGesture/TapGesture/screenshot.png -------------------------------------------------------------------------------- /TransitionWithView/README.md: -------------------------------------------------------------------------------- 1 | TransitionWithView 2 | ================== 3 | 4 | https://h4labs.wordpress.com/2015/04/29/curling-a-uiview-updown-with-swift/ 5 | 6 | ![View](https://h4labs.files.wordpress.com/2015/04/curl_up_working2.png) 7 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TransitionWithView 4 | // 5 | // Created by Michael Mellinger on 4/28/15. 6 | // Copyright (c) 2015 h4labs. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillEnterForeground(_ application: UIApplication) { 23 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 24 | } 25 | 26 | func applicationDidBecomeActive(_ application: UIApplication) { 27 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 28 | } 29 | 30 | func applicationWillTerminate(_ application: UIApplication) { 31 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 32 | } 33 | 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Transition with View 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | 14 | ``` 15 | 16 | 17 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithView/TransitionWithView/screenshot-small.png -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithView/TransitionWithView/screenshot-toc.png -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithView/TransitionWithView/screenshot.png -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TransitionWithView/TransitionWithViewTests/TransitionWithViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionWithViewTests.swift 3 | // TransitionWithViewTests 4 | // 5 | // Created by Michael Mellinger on 4/28/15. 6 | // Copyright (c) 2015 h4labs. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class TransitionWithViewTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/README.md: -------------------------------------------------------------------------------- 1 | TransitionWithView Containing Centered UILabel 2 | === 3 | 4 | ![View](docs/curl_up_with_centered_label_small.png) 5 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Transition with View 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | 10 | ### Important Functions 11 | 12 | ```swift 13 | 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot-small.png -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot-toc.png -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithViewAndLabels/TransitionWithViewAndLabels/screenshot.png -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabelsTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/TransitionWithViewAndLabelsTests/TransitionWithViewAndLabelsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionWithViewAndLabelsTests.swift 3 | // TransitionWithViewAndLabelsTests 4 | // 5 | // Created by Michael Mellinger on 4/30/15. 6 | // Copyright (c) 2015 h4labs. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class TransitionWithViewAndLabelsTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/docs/curl_up_with_centered_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithViewAndLabels/docs/curl_up_with_centered_label.png -------------------------------------------------------------------------------- /TransitionWithViewAndLabels/docs/curl_up_with_centered_label_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TransitionWithViewAndLabels/docs/curl_up_with_centered_label_small.png -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/Assets.xcassets/Apple News.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : 1, 13 | "alpha" : 1, 14 | "blue" : 0.33, 15 | "green" : 0.18 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/README.md: -------------------------------------------------------------------------------- 1 | Menu: [Home](../../README.md) 2 | 3 | ## Two Buttons In StackView 4 | 5 | ![Screenshot](screenshot-small.png) 6 | 7 | ### Overview 8 | 9 | - Buttons are equal size with 25 points between them 10 | - StackView is centered horizontally 11 | - StackView 10 points above bottom anchor 12 | - Add some extra padding to button width and height 13 | 14 | ```swift 15 | 16 | 17 | 18 | ``` 19 | 20 | ### Important Functions 21 | 22 | ```swift 23 | private func buildView() {...} 24 | 25 | ``` 26 | 27 | 28 | ### Additional Functions 29 | ```swift 30 | // Add some extra button padding 31 | rightBtn.contentEdgeInsets = UIEdgeInsets.init(top: 5, left: 5, bottom: 5, right: 5) 32 | 33 | ``` 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TwoButtonsInStackView/TwoButtonsInStackView/screenshot-small.png -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TwoButtonsInStackView/TwoButtonsInStackView/screenshot-toc.png -------------------------------------------------------------------------------- /TwoButtonsInStackView/TwoButtonsInStackView/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/TwoButtonsInStackView/TwoButtonsInStackView/screenshot.png -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms/screenshot-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ViewTransforms/ViewTransforms/screenshot-small.png -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms/screenshot-toc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ViewTransforms/ViewTransforms/screenshot-toc.png -------------------------------------------------------------------------------- /ViewTransforms/ViewTransforms/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/melling/ios_topics/ee58257f6e3ac2909a6c4b2ded1fc65fc084d8ba/ViewTransforms/ViewTransforms/screenshot.png -------------------------------------------------------------------------------- /WebView/WebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebView/WebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WebView/WebView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WebView/WebView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /WebView/WebView/README.md: -------------------------------------------------------------------------------- 1 | # Simple WKWebview 2 | 3 | 4 | [![Screenshot](screenshot-small.png) 5 | 6 | ## TODO 7 | - 8 | 9 | ## Overview 10 | 11 | 12 | ## Resources 13 | - https://nshipster.com/wkwebview/ 14 | - https://gist.github.com/starhoshi/efde2a0283f05e6a4d32a225617294ab 15 | 16 | -------------------------------------------------------------------------------- /screenshots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | 3 | convert ./screenshot.png -resize 25% screenshot-small.png; # Smaller screenshot 4 | convert ./screenshot.png -resize 20% screenshot-toc.png; # Table of Contents screenshot 5 | 6 | echo "git add screenshot*" 7 | --------------------------------------------------------------------------------