Skip to content

Instantly share code, notes, and snippets.

View comiclandapp's full-sized avatar
💭
Vaporizing ComicLand

Antonio Montes comiclandapp

💭
Vaporizing ComicLand
View GitHub Profile
@dchohfi
dchohfi / PageViewControllerSegmentedAdapter.swift
Created December 16, 2016 01:32
Connect UISegmentControll to UIPageViewController
import UIKit
final class PageViewControllerSegmentedAdapter: NSObject {
private let pageViewController: UIPageViewController
fileprivate let segmentControl: UISegmentedControl
fileprivate let viewControllers: [UIViewController]
fileprivate var selectedIndex: Int = 0
init(pageViewController: UIPageViewController, segmentControl: UISegmentedControl, viewControllers: [UIViewController]) {