Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
twof committed Dec 14, 2018
1 parent ccd470a commit e673c14
Show file tree
Hide file tree
Showing 16 changed files with 917 additions and 25 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2

workflows:
version: 2
main:
jobs:
- hold:
type: approval
- build:
requires: [hold]

jobs:
build:
requires: hold
# Specify the Xcode version to use
macos:
xcode: "10.1.0"

steps:
- checkout

- attach_workspace:
at: .

- run:
name: Build and run tests
command: fastlane scan
environment:
SCAN_DEVICE: iPhone 7
SCAN_SCHEME: SimplePagedViewFrameworkTests
SCAN_DERIVED_DATA_PATH: build/DerivedData
SCAN_OUTPUT_DIRECTORY: build/Output

- persist_to_workspace:
root: .
paths:
- 'build'

# Collect XML test results data to show in the UI,
# and save the same XML files under test-results folder
# in the Artifacts tab
- store_test_results:
path: test_output/report.xml
- store_artifacts:
path: /tmp/test-results
destination: scan-test-results
- store_artifacts:
path: ~/Library/Logs/scan
destination: scan-logs

78 changes: 78 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2018 Air Computing Inc

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SimplePagedView

SimplePagedView is an iOS component that makes it as easy as possible to set up a page view for things like onboarding or presenting information.

![simulator screen shot - iphone 8 - 2018-12-12 at 12 54 46](https://user-images.githubusercontent.com/5561501/49899079-87bbda80-fe0f-11e8-82ec-ea523e6cd42c.png)

## Installation

```ruby
pod 'SimplePagedView'
```

## Usage

```swift
// Create a PagedViewController by providing it with a view for each page you'd like it to contain
let pagedViewController = PagedViewController(with:
LogoView(presenter: welcomePresenter),
CardPageView(image: ThemeManager.Images.welcomeTourSlide1,
subtitle: "Complete and resolve tasks on the go"),
CardPageView(image: ThemeManager.Images.welcomeTourSlide2,
subtitle: "Comment on tasks and conversations"),
CardPageView(image: ThemeManager.Images.welcomeTourSlide3,
subtitle: "Add files and pictures in seconds")
)

// Add the pagedViewController as a child view controller
self.add(pagedViewController) { (childView) -> [NSLayoutConstraint] in
// Return an array of constraints to apply to the paged view
return [
childView.topAnchor.constraint(equalTo: view.readableContentGuide.topAnchor),
childView.leadingAnchor.constraint(equalTo: view.readableContentGuide.leadingAnchor),
childView.trailingAnchor.constraint(equalTo: view.readableContentGuide.trailingAnchor),
childView.bottomAnchor.constraint(equalTo: view.readableContentGuide.bottomAnchor)
]
}
```
27 changes: 27 additions & 0 deletions SimplePagedView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Pod::Spec.new do |s|

s.name = "SimplePagedView"
s.version = "0.0.2"
s.summary = "A PageViewController replacement built to be as simple as possible"

s.description = <<-DESC
A PageViewController replacement built to be as simple as possible to use. Supports easy insertion of views and the classic page dots. Also supports many customization points alongside reasonable defaults.
DESC

s.homepage = "http://github.com/redbooth/SimplePagedView"

s.license = "MIT"

s.author = { "Alex Reilly" => "[email protected]" }
s.social_media_url = "https://twitter.com/TheWisestFools"

s.platform = :ios, "12.0"


s.source = { :git => "https://github.com/redbooth/SimplePagedView.git", :tag => s.version }

s.source_files = "SimplePagedViewFramework/**/*{swift}"

s.swift_version = "4.2"

end
72 changes: 66 additions & 6 deletions SimplePagedViewFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
/* Begin PBXBuildFile section */
B2C6870F21C191F2000031AB /* SimplePagedViewFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2C6870521C191F2000031AB /* SimplePagedViewFramework.framework */; };
B2C6871421C191F2000031AB /* SimplePagedViewFrameworkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6871321C191F2000031AB /* SimplePagedViewFrameworkTests.swift */; };
B2C6871621C191F2000031AB /* SimplePagedViewFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C6870821C191F2000031AB /* SimplePagedViewFramework.h */; settings = {ATTRIBUTES = (Public, ); }; };
B2C6872821C19218000031AB /* NSLayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6872021C19217000031AB /* NSLayoutConstraint.swift */; };
B2C6872921C19218000031AB /* UIImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6872121C19217000031AB /* UIImage.swift */; };
B2C6872B21C19218000031AB /* ExternallyInteractiveUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6872421C19217000031AB /* ExternallyInteractiveUIView.swift */; };
B2C6872C21C19218000031AB /* SimplePagedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6872521C19218000031AB /* SimplePagedView.swift */; };
B2C6873121C1AE10000031AB /* UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6873021C1AE10000031AB /* UIViewController.swift */; };
B2C6898421C342D5000031AB /* PageDotsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6898321C342D5000031AB /* PageDotsView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -24,11 +29,16 @@

/* Begin PBXFileReference section */
B2C6870521C191F2000031AB /* SimplePagedViewFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SimplePagedViewFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B2C6870821C191F2000031AB /* SimplePagedViewFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimplePagedViewFramework.h; sourceTree = "<group>"; };
B2C6870921C191F2000031AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B2C6870E21C191F2000031AB /* SimplePagedViewFrameworkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimplePagedViewFrameworkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B2C6871321C191F2000031AB /* SimplePagedViewFrameworkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimplePagedViewFrameworkTests.swift; sourceTree = "<group>"; };
B2C6871521C191F2000031AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B2C6872021C19217000031AB /* NSLayoutConstraint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSLayoutConstraint.swift; sourceTree = "<group>"; };
B2C6872121C19217000031AB /* UIImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImage.swift; sourceTree = "<group>"; };
B2C6872421C19217000031AB /* ExternallyInteractiveUIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExternallyInteractiveUIView.swift; sourceTree = "<group>"; };
B2C6872521C19218000031AB /* SimplePagedView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimplePagedView.swift; sourceTree = "<group>"; };
B2C6873021C1AE10000031AB /* UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewController.swift; sourceTree = "<group>"; };
B2C6898321C342D5000031AB /* PageDotsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageDotsView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -71,7 +81,7 @@
B2C6870721C191F2000031AB /* SimplePagedViewFramework */ = {
isa = PBXGroup;
children = (
B2C6870821C191F2000031AB /* SimplePagedViewFramework.h */,
B2C6872F21C1A8C8000031AB /* Source */,
B2C6870921C191F2000031AB /* Info.plist */,
);
path = SimplePagedViewFramework;
Expand All @@ -86,14 +96,50 @@
path = SimplePagedViewFrameworkTests;
sourceTree = "<group>";
};
B2C6871F21C19217000031AB /* Extensions */ = {
isa = PBXGroup;
children = (
B2C6872021C19217000031AB /* NSLayoutConstraint.swift */,
B2C6872121C19217000031AB /* UIImage.swift */,
B2C6873021C1AE10000031AB /* UIViewController.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
B2C6872321C19217000031AB /* Helpers */ = {
isa = PBXGroup;
children = (
B2C6872421C19217000031AB /* ExternallyInteractiveUIView.swift */,
);
path = Helpers;
sourceTree = "<group>";
};
B2C6872F21C1A8C8000031AB /* Source */ = {
isa = PBXGroup;
children = (
B2C6872521C19218000031AB /* SimplePagedView.swift */,
B2C6898221C342B6000031AB /* Views */,
B2C6872321C19217000031AB /* Helpers */,
B2C6871F21C19217000031AB /* Extensions */,
);
path = Source;
sourceTree = "<group>";
};
B2C6898221C342B6000031AB /* Views */ = {
isa = PBXGroup;
children = (
B2C6898321C342D5000031AB /* PageDotsView.swift */,
);
path = Views;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
B2C6870021C191F2000031AB /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
B2C6871621C191F2000031AB /* SimplePagedViewFramework.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -148,6 +194,7 @@
TargetAttributes = {
B2C6870421C191F2000031AB = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
};
B2C6870D21C191F2000031AB = {
CreatedOnToolsVersion = 10.1;
Expand Down Expand Up @@ -194,6 +241,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B2C6872821C19218000031AB /* NSLayoutConstraint.swift in Sources */,
B2C6898421C342D5000031AB /* PageDotsView.swift in Sources */,
B2C6872B21C19218000031AB /* ExternallyInteractiveUIView.swift in Sources */,
B2C6872C21C19218000031AB /* SimplePagedView.swift in Sources */,
B2C6872921C19218000031AB /* UIImage.swift in Sources */,
B2C6873121C1AE10000031AB /* UIViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -268,7 +321,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -326,7 +379,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -341,6 +394,7 @@
B2C6871A21C191F2000031AB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand All @@ -349,6 +403,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SimplePagedViewFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -357,6 +412,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.twof.SimplePagedViewFramework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -365,6 +421,7 @@
B2C6871B21C191F2000031AB /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
Expand All @@ -373,6 +430,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SimplePagedViewFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -389,6 +447,7 @@
B2C6871D21C191F2000031AB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = SimplePagedViewFrameworkTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -406,6 +465,7 @@
B2C6871E21C191F2000031AB /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = SimplePagedViewFrameworkTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Loading

0 comments on commit e673c14

Please sign in to comment.