-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tomoya Hayakawa
authored and
Tomoya Hayakawa
committed
Mar 23, 2017
0 parents
commit f3c9c4f
Showing
59 changed files
with
3,798 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
## Build generated | ||
build/ | ||
DerivedData/ | ||
|
||
## Various settings | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata/ | ||
|
||
## Other | ||
*.moved-aside | ||
*.xcuserstate | ||
|
||
## 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/ | ||
.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/ | ||
|
||
# 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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'AutoToggleHeaderFooterView' | ||
s.version = '1.0.0' | ||
s.summary = 'A header and footer toggle display-state depending on the scroll or time interval' | ||
s.homepage = 'https://github.com/recruit-lifestyle/AutoToggleHeaderFooterView' | ||
s.license = 'Apache License, Version 2.0' | ||
s.author = { 'Tomoya Hayakawa' => 'rhd_internship_ER5@r.recruit.co.jp' } | ||
s.source = { :git => 'https://github.com/recruit-lifestyle/AutoToggleHeaderFooterView.git', :tag => s.version.to_s } | ||
|
||
s.ios.deployment_target = '8.0' | ||
s.platform = :ios, '8.0' | ||
|
||
s.source_files = 'AutoToggleHeaderFooterView/Classes/**/*' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// Constraint.swift | ||
// Pods | ||
// | ||
// Created by Tomoya Hayakawa on 2017/03/01. | ||
// Copyright (c) 2017 RECRUIT LIFESTYLE CO., LTD. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
struct Constraint { | ||
static func make(_ view1: Any, _ attr1: NSLayoutAttribute, _ relation: NSLayoutRelation, to view2: Any?, _ attr2: NSLayoutAttribute, multiplier: CGFloat = 1.0, constant c: CGFloat = 0, priority: UILayoutPriority? = nil) -> NSLayoutConstraint { | ||
let constraint = NSLayoutConstraint(item: view1, attribute: attr1, relatedBy: relation, | ||
toItem: view2, attribute: attr2, multiplier: multiplier, constant: c) | ||
if let priority = priority { | ||
constraint.priority = priority | ||
} | ||
|
||
return constraint | ||
} | ||
|
||
static func make(_ view1: Any, edgesEqualTo view2: Any, multiplier: CGFloat = 1.0, priority: UILayoutPriority? = nil) -> [NSLayoutConstraint] { | ||
let constraints = [ | ||
NSLayoutConstraint(item: view1, attribute: .top, relatedBy: .equal, toItem: view2, attribute: .top, multiplier: multiplier, constant: 0), | ||
NSLayoutConstraint(item: view1, attribute: .left, relatedBy: .equal, toItem: view2, attribute: .left, multiplier: multiplier, constant: 0), | ||
NSLayoutConstraint(item: view1, attribute: .bottom, relatedBy: .equal, toItem: view2, attribute: .bottom, multiplier: multiplier, constant: 0), | ||
NSLayoutConstraint(item: view1, attribute: .right, relatedBy: .equal, toItem: view2, attribute: .right, multiplier: multiplier, constant: 0) | ||
] | ||
if let priority = priority { | ||
constraints.forEach { $0.priority = priority } | ||
} | ||
|
||
return constraints | ||
} | ||
|
||
static func make(_ view: Any, width relation: NSLayoutRelation, to constant: CGFloat, priority: UILayoutPriority? = nil) -> NSLayoutConstraint { | ||
let constraint = NSLayoutConstraint(item: view, attribute: .width, relatedBy: relation, toItem: nil, attribute: .width, multiplier: 1.0, constant: constant) | ||
if let priority = priority { | ||
constraint.priority = priority | ||
} | ||
|
||
return constraint | ||
} | ||
|
||
static func make(_ view: Any, height relation: NSLayoutRelation, to constant: CGFloat, priority: UILayoutPriority? = nil) -> NSLayoutConstraint { | ||
let constraint = NSLayoutConstraint(item: view, attribute: .height, relatedBy: relation, toItem: nil, attribute: .height, multiplier: 1.0, constant: constant) | ||
if let priority = priority { | ||
constraint.priority = priority | ||
} | ||
|
||
return constraint | ||
} | ||
} |
Oops, something went wrong.