Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	TLYShyNavBar/TLYShyNavBarManager.h
#	TLYShyNavBar/TLYShyNavBarManager.m
This commit is contained in:
Gian Franco Zabarino 2015-12-11 18:08:05 -03:00
commit 53cf176916
67 changed files with 2517 additions and 598 deletions

33
CHANGELOG.md Normal file
View File

@ -0,0 +1,33 @@
## v0.10.1
#### Fixes
+ Hot fix an issue with UIViewControllers that have a UIScrollView subclass as their view property (i.e. collectionView, tableView, ...) that caused shyNavBar to be stubbornNavBar, refusing to contract.
## v0.10.0
#### Enhancements
+ New approach to calculate extension and navigation bar offsets.<br />
Initially, we externally injected the calculation through blocks. The calculations depended on layout guide, and other weird stuff. The new approach simply calculates the offset based on the parent: status bar -> navigation bar -> extension view.
+ Added support for sticky navigation bar
## v0.9.15
#### Enhancements
+ Added support for fading the entire navigation bar
+ Added modal support by checking navigation bar overlap with status bar
+ Added visual tests in the demo to see all the features in action
#### Fixes
+ Fixed an issue with scrolling to top functionality
#### Deprecations
+ Deprecated the fading booleans in favour of a new enum.

139
README.md
View File

@ -1,7 +1,13 @@
# TLYShyNavBar
![TLYShyNavBar banner](http://imgur.com/UVxJLxu.png)<br />
__v1.0, Finally! With better code design, and fully featured!__
-----
This component helps you mimick the navigation bar auto scrolling that you see in the facebook, instagram and other apps. Not only that, but with the ability to add an additional extension that scrolls along as well! It is designed for **ease of use**, and is battle tested in our own [Telly app](https://itunes.apple.com/us/app/telly/id524552885?mt=8)<sup>[1]</sup>!
![Pod Version](https://img.shields.io/cocoapods/v/TLYShyNavBar.svg)
![Pod License](https://img.shields.io/badge/license-MIT-blue.svg)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
This component helps you mimic the navigation bar auto scrolling that you see in the Facebook, Instagram, 9gag (which uses this!) and other apps. Not only that, but with the ability to add an additional extension that scrolls along as well! It is designed for **ease of use**, and is battle tested in our own [Telly app](https://itunes.apple.com/us/app/telly/id524552885?mt=8)<sup>[1]</sup>!
![Battle Tested!!](resources/battle-tested-demo.gif)
@ -16,80 +22,65 @@ This component helps you mimick the navigation bar auto scrolling that you see i
+ **[A Deeper Look](#a-deeper-look)**: You're invensted in this now and want to make the most out of it.
+ **[How it Works](#how-it-works)**: The deep stuff...
+ **[Remarks](#remarks)**: Read this before losing all hope.
+ **[Contributing](#contributing)**: Together, making iOS better.
+ **[Author](#author)**: Watashi-da!
+ **[Similar Projects](#similar-projects)**: Similar projects that influenced the project in some way.
## Features
+ Optional extension view to the `UINavigationBar`!
| Feature | Demo |
|---|---|
| Scroll a `UINavigationBar` with an extension view | ![](resources/basic-feature.gif) |
| Support opaque and translucent `UINavigationBar`s | ![](resources/opaque-supported.gif) |
| Fully featured, with animations and variable resistance | ![](resources/fully-featured.gif) |
| Responsive, resilient and robust | ![](resources/robust.gif) |
| Supports `UITableView`, with headers, too! | ![](resources/tableview.gif) |
| `UICollectionView` is more than welcome | ![](resources/collectionView.gif) |
| In-call status bar? No problem! | ![](resources/in-app-call.gif) |
| Sticky extension view (Thanks @yukaliao !) | ![](resources/sticky-extension.gif) |
| Sticky navigation bar (Thanks [@TiagoVeloso](https://github.com/TiagoVeloso)!) | ![](resources/sticky-navbar.gif) |
| Fade the entire navbar (Thanks [__@longsview__](https://github.com/longsview)!) | ![](resources/fade-navbar.gif) |
![](resources/ShyNavBar-1.gif)
You can test some of these features in the Objective-C demo:
+ Auto expand if below threshold
![](resources/ShyNavBar-2.gif)
+ Auto contract if below threshold
![](resources/ShyNavBar-3.gif)
+ Very responsive, resilient and robust
![](resources/ShyNavBar-4.gif)
+ Adjustable expansion resistance
![](resources/ShyNavBar-5.gif)
+ Plays well with `pushViewController`
![](resources/ShyNavBar-6.gif)
![](resources/features-testing.png)
## Quick Start
1. Get the component
+ [CocoaPods](http://cocoapods.org)
* Add the following to you [Podfile](http://guides.cocoapods.org/using/the-podfile.html) `pod TLYShyNavBar`
+ Using [CocoaPods](http://cocoapods.org):<br />
Add the following to you [Podfile](http://guides.cocoapods.org/using/the-podfile.html) `pod 'TLYShyNavBar'`<br />
Import the header `#import <TLYShyNavBar/TLYShyNavBarManager.h>`
+ Download the project/git submodules, and drag the `TLYShyNavBar` folder to your project.
+ Using [Carthage](https://github.com/Carthage/Carthage) (Thanks [@bradleyayers](https://github.com/bradleyayers)!):<br />
Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md) `github "telly/TLYShyNavBar"`<br />
Import the header `#import <TLYShyNavBar/TLYShyNavBar.h>`
2. `#import "TLYShyNavBarManager.h"`
+ I suggest adding it to your pch file, or wherever you want to use the component.
+ Using Submodules:<br />
Download the project/git submodules, and drag the `TLYShyNavBar` folder to your project. <br />
Import the header `#import "TLYShyNavBarManager.h"`
3. Write one line of code to get started!!
2. Write one line of code to get started!!
```objc
/* In your UIViewController viewDidLoad or after creating the scroll view. */
self.shyNavBarManager.scrollView = self.scrollView;
```
**IMPORTANT!!** If you are assigning a delegate to your scrollView, do that **before** assigning the scrollView to the `TLYShyNavBarManager`! To learn more, [see below](#how-it-works).
**IMPORTANT NOTES!!**
1. Don't use with `UITableViewController`. Add a `UITableView` as a subview of `UIViewController` instead.
2. If you are assigning a delegate to your scrollView, do that **before** assigning the scrollView to the `TLYShyNavBarManager`! To learn more, [see below](#how-it-works).
### Using TLYShyNavBar in Swift
If you are building apps in Swift and targeting apps to iOS7 Apples [hidesBarsOnSwipe](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/#//apple_ref/occ/instp/UINavigationController/hidesBarsOnSwipe) will not work because it is in an iOS 8 feature. As an alternative you can use TLYShyNavBar component in lieu of Apples feature.
To use this component in Swift
Nothing special is needed, really. Just make sure you have a [Bridging Header](http://stackoverflow.com/questions/31716413/xcode-not-automatically-creating-bridging-header) setup, and import:
1. Clone this git repository locally: `git clone https://github.com/telly/TLYShyNavBar.git`
2. Copy the `TLYShyNavBar` directory into your Swift project. <br />![](resources/Swift-project.png)
3. Create a new header file called `Bridging-Header.h` and add the headers from `TLYShyNavBar` folder.[see headers below](#bridge-headers).
4. Add the bridging header file to the project's build settings. Search `Bridging Header` in `Build Settings` and add `Bridging-Header.h`. <br />![](resources/Bridged-Header.png)
Now your project is setup to use the TLYShyNavBar component. Next all you need to do is set the scrollview property in your UIViewController like it was an Objective-c project.
```
/* In your UIViewController viewDidLoad or after creating the scroll view. */
self.shyNavBarManager.scrollView = self.scrollView;
```
#### Bridge Headers
```
```objc
#import "TLYShyNavBarManager.h"
#import "TLYShyViewController.h"
#import "TLYDelegateProxy.h"
#import "NSObject+TLYSwizzlingHelpers.h"
#import "UIViewController+BetterLayoutGuides.h"
```
Then, you should be able to follow the Objective-C instructions, since the code is almost identical.
## Design Goals
@ -99,7 +90,7 @@ self.shyNavBarManager.scrollView = self.scrollView;
## A Deeper Look
The above example, while small, is complete! It makes the navigation bar enriched with humbility, that it will start getting out of the way when the scroll view starts scrolling. But, you may want to do more than that!
The above example, while small, is complete! It makes the navigation bar enriched with humility, that it will start getting out of the way when the scroll view starts scrolling. But, you may want to do more than that!
#### ACCESS THE MANAGER OF SHYNESS
@ -118,6 +109,13 @@ You can assign your own extension view, and it will appear right beneath the nav
[self.shyNavBarManager setExtensionView:self.toolbar];
```
To stick the extension view to the top and have it remain visible when the navigation bar has been hidden:
```objc
/* Also in your UIViewController subclass */
[self.shyNavBarManager setStickyExtensionView:YES];
```
#### CONTROLLING THE RESISTANCE
When you starting scrolling up (going down the view) or scrolling down (going up the view), you may want the navigation bar to hold off for a certain amount (tolerance) before changing states. (i.e. if the user scrolls down 10 px, don't immediately start showing the contracted navigation bar, but wait till he scrolls, say, 100 px).
@ -132,9 +130,20 @@ You can control that using the following properties on the `shyNavBarManager`:
@property (nonatomic) CGFloat contractionResistance; // default 0
```
#### CONTROLLING THE FADE BEHAVIOR
You can customize the fade behavior of the `UINavigationBar` through this property:
```objc
/* Choose how the navbar fades as it contracts/expands.
* Defaults to FadeSubviews
*/
@property (nonatomic) TLYShyNavBarFade fadeBehavior;
```
## How it Works
OK, I'll admit that I added this section purely to rant about how this project came together, and the desicion making process behind it.
OK, I'll admit that I added this section purely to rant about how this project came together, and the decision making process behind it.
#### THE BASICS
@ -160,30 +169,32 @@ This one was a pain... First, the experiments that this project went through inc
+ Adding a `UIPanGestureRecognizer` to the scroll view.
+ Make the user implement `UIScrollViewDelegate`, and send us the events.
The above didn't yield the perfect experience we were hoping for, except the last one. It did, however, make for redundant code everywhere, and forced the component user to implement the `UIScrollViewDelegate`. Tha's when the `NSProxy` happened.
The above didn't yield the perfect experience we were hoping for, except the last one. It did, however, make for redundant code everywhere, and forced the component user to implement the `UIScrollViewDelegate`. That's when the `NSProxy` happened.
When you assign the `scrollView` property to the TLYShyNavBarManager, we attach a proxy object to the `UIScrollView` as the delegate, and then the original delegate to that proxy. The proxy forwards the events we are interested in to the `TLYShyNavBarManager`, and of course, does everything else normally for the original selector, you won't even notice a thing!
#### THE DRAWER CONCEPT
The way the offsets are applied to the navigation bar and extension view is through an elegent linked list implementation. We set the offset to the first node (navigation bar), and ...
The way the offsets are applied to the navigation bar and extension view is through an elegant doubly linked list implementation. We set the offset to the first node (navigation bar), and ...
+ If it is contracting:
- We pass the contraction amount to the next node, and it returned a residual amount.
- We pass the contraction amount to the next node, and it returns a residual amount.
+ If we are expanding:
- We process the offset in the first node, and pass the residual to the next node.
It is a simple concept. Say we dragged down by 100 px, and the nav bar was contracted. The navigation bar would take 64 px of that to expand, and then pass the residual 36 px to the next node (extension view) to calculate its offset. The same goes for contracting, but it starts from the last node, all the way up to the navigation bar.
It is a simple concept. Say we dragged down by 100 px while the navbar was contracted. The navigation bar would take 44 px of that to expand, and then pass the residual 56 px to the next node (extension view) to calculate its offset. The same goes for contracting, but it starts from the last node, all the way up to the navigation bar.
We also add a parent relationship for a single purpose: Make the child follow its parent's offset. So, if the parent (e.g. navigation bar) is scrolling away to the top, we make sure the child accommodates the parent's offset in the calculation, so it appears as if the child is a subview of the parent.
*Note:* Even though there might be an illusion that the views are expanding and contracting, it's really just a translation (scrolling) of the views. There might be an advantage to actually resizing the bounds, so the extension view doesn't appear behind the navigation bar, for example, so that approach might be explored in the future.
## Remarks
There are downsides in making this component as easy to use as it is. If you have read the how it works section carefully, you'd realize that trying to configure the the `shyNavBarManager` before it is included in the `UINavigationController` heirarchy, will break the component, since within the component, we cannot find the navigation bar, and an assert is triggered:
There are downsides in making this component as easy to use as it is. If you have read the how it works section carefully, you'd realize that trying to configure the the `shyNavBarManager` before it is included in the `UINavigationController` hierarchy, will break the component, since within the component, we cannot find the navigation bar, and an assert is triggered:
```objc
NSAssert(navbar != nil, @"You are using the component wrong... Please see the README file.");
NSAssert(navbar != nil, @"Please make sure the viewController is already attached to a navigation controller.");
```
Of course, that can be avoided by creating your own `TLYShyNavBarManager`, like so:
@ -196,6 +207,18 @@ shyManager.expansionResistance = 777.f;
viewController.shyNavBarManager = shyManager;
```
## Contributing
PRs are welcome! It is important to test changes, though. Simply go over the demo, make sure nothing is broken. Please do check both translucent and opaque modes. Once all is good, you're good to go!
If it is a feature or bug, it would be greatly appreciated if a new view is added to the demo project demonstrating the bug/feature.
Thanks for everyone who opened an issue, shot me an email, and submitted a PR. Special thanks to those who submitted code that got checked in! This project was made possible with your help. ([See contributors graph](https://github.com/telly/TLYShyNavBar/graphs/contributors))
## Author
Mazyod ([@Mazyod](http://twitter.com/mazyod))
## Similar Projects
+ [BLKFlexibleHeightBar](https://github.com/bryankeller/BLKFlexibleHeightBar)

View File

@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#
s.name = "TLYShyNavBar"
s.version = "0.9.10"
s.version = "1.0.0"
s.summary = "TLYShyNavBar makes your UINavigationBar expand/shrink by adding just a single line. It also comes with extension view support!"
s.description = <<-DESC
@ -81,7 +81,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/telly/TLYShyNavBar.git", :tag => "0.9.10" }
s.source = { :git => "https://github.com/telly/TLYShyNavBar.git", :tag => "1.0.0" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@ -95,7 +95,7 @@ Pod::Spec.new do |s|
s.source_files = "TLYShyNavBar/**/*"
s.exclude_files = ""
s.public_header_files = "TLYShyNavBar/TLYShyNavBarManager.h"
s.public_header_files = "TLYShyNavBar/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

View File

@ -0,0 +1,386 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
A21B00001BFDD41100F9FB54 /* TLYShyScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFF81BFDD41100F9FB54 /* TLYShyScrollViewController.m */; };
A21B00011BFDD41100F9FB54 /* TLYShyStatusBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFF91BFDD41100F9FB54 /* TLYShyStatusBarController.h */; };
A21B00021BFDD41100F9FB54 /* TLYShyStatusBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFFA1BFDD41100F9FB54 /* TLYShyStatusBarController.m */; };
A21B00031BFDD41100F9FB54 /* TLYShyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFFB1BFDD41100F9FB54 /* TLYShyViewController.h */; };
A21B00041BFDD41100F9FB54 /* TLYShyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFFC1BFDD41100F9FB54 /* TLYShyViewController.m */; };
A21B00081BFDD41900F9FB54 /* TLYShyNavBarFade.h in Headers */ = {isa = PBXBuildFile; fileRef = A21B00051BFDD41900F9FB54 /* TLYShyNavBarFade.h */; settings = {ATTRIBUTES = (Public, ); }; };
A21B00091BFDD41900F9FB54 /* TLYShyNavBarManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A21B00061BFDD41900F9FB54 /* TLYShyNavBarManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
A21B000A1BFDD41900F9FB54 /* TLYShyNavBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A21B00071BFDD41900F9FB54 /* TLYShyNavBarManager.m */; };
A21BFFA71BFDCC8800F9FB54 /* TLYShyNavBar.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFA61BFDCC8800F9FB54 /* TLYShyNavBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
A21BFFED1BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFE51BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.h */; };
A21BFFEE1BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFE61BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.m */; };
A21BFFEF1BFDD40800F9FB54 /* TLYDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFE71BFDD40800F9FB54 /* TLYDelegateProxy.h */; };
A21BFFF01BFDD40800F9FB54 /* TLYDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFE81BFDD40800F9FB54 /* TLYDelegateProxy.m */; };
A21BFFF11BFDD40800F9FB54 /* UIScrollView+Helpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFE91BFDD40800F9FB54 /* UIScrollView+Helpers.h */; };
A21BFFF21BFDD40800F9FB54 /* UIScrollView+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFEA1BFDD40800F9FB54 /* UIScrollView+Helpers.m */; };
A21BFFF31BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFEB1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.h */; };
A21BFFF41BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.m in Sources */ = {isa = PBXBuildFile; fileRef = A21BFFEC1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.m */; };
A21BFFFD1BFDD41100F9FB54 /* TLYShyChild.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFF51BFDD41100F9FB54 /* TLYShyChild.h */; };
A21BFFFE1BFDD41100F9FB54 /* TLYShyParent.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFF61BFDD41100F9FB54 /* TLYShyParent.h */; };
A21BFFFF1BFDD41100F9FB54 /* TLYShyScrollViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A21BFFF71BFDD41100F9FB54 /* TLYShyScrollViewController.h */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
A21B00051BFDD41900F9FB54 /* TLYShyNavBarFade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarFade.h; sourceTree = "<group>"; };
A21B00061BFDD41900F9FB54 /* TLYShyNavBarManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarManager.h; sourceTree = "<group>"; };
A21B00071BFDD41900F9FB54 /* TLYShyNavBarManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyNavBarManager.m; sourceTree = "<group>"; };
A21BFFA41BFDCC8800F9FB54 /* TLYShyNavBar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TLYShyNavBar.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A21BFFA61BFDCC8800F9FB54 /* TLYShyNavBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBar.h; sourceTree = "<group>"; };
A21BFFA81BFDCC8800F9FB54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A21BFFE51BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSObject+TLYSwizzlingHelpers.h"; path = "Categories/NSObject+TLYSwizzlingHelpers.h"; sourceTree = "<group>"; };
A21BFFE61BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSObject+TLYSwizzlingHelpers.m"; path = "Categories/NSObject+TLYSwizzlingHelpers.m"; sourceTree = "<group>"; };
A21BFFE71BFDD40800F9FB54 /* TLYDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYDelegateProxy.h; path = Categories/TLYDelegateProxy.h; sourceTree = "<group>"; };
A21BFFE81BFDD40800F9FB54 /* TLYDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TLYDelegateProxy.m; path = Categories/TLYDelegateProxy.m; sourceTree = "<group>"; };
A21BFFE91BFDD40800F9FB54 /* UIScrollView+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+Helpers.h"; path = "Categories/UIScrollView+Helpers.h"; sourceTree = "<group>"; };
A21BFFEA1BFDD40800F9FB54 /* UIScrollView+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+Helpers.m"; path = "Categories/UIScrollView+Helpers.m"; sourceTree = "<group>"; };
A21BFFEB1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+BetterLayoutGuides.h"; path = "Categories/UIViewController+BetterLayoutGuides.h"; sourceTree = "<group>"; };
A21BFFEC1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+BetterLayoutGuides.m"; path = "Categories/UIViewController+BetterLayoutGuides.m"; sourceTree = "<group>"; };
A21BFFF51BFDD41100F9FB54 /* TLYShyChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYShyChild.h; path = ShyControllers/TLYShyChild.h; sourceTree = "<group>"; };
A21BFFF61BFDD41100F9FB54 /* TLYShyParent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYShyParent.h; path = ShyControllers/TLYShyParent.h; sourceTree = "<group>"; };
A21BFFF71BFDD41100F9FB54 /* TLYShyScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYShyScrollViewController.h; path = ShyControllers/TLYShyScrollViewController.h; sourceTree = "<group>"; };
A21BFFF81BFDD41100F9FB54 /* TLYShyScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TLYShyScrollViewController.m; path = ShyControllers/TLYShyScrollViewController.m; sourceTree = "<group>"; };
A21BFFF91BFDD41100F9FB54 /* TLYShyStatusBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYShyStatusBarController.h; path = ShyControllers/TLYShyStatusBarController.h; sourceTree = "<group>"; };
A21BFFFA1BFDD41100F9FB54 /* TLYShyStatusBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TLYShyStatusBarController.m; path = ShyControllers/TLYShyStatusBarController.m; sourceTree = "<group>"; };
A21BFFFB1BFDD41100F9FB54 /* TLYShyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TLYShyViewController.h; path = ShyControllers/TLYShyViewController.h; sourceTree = "<group>"; };
A21BFFFC1BFDD41100F9FB54 /* TLYShyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TLYShyViewController.m; path = ShyControllers/TLYShyViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
A21BFFA01BFDCC8800F9FB54 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
A21BFF711BFDCB3E00F9FB54 = {
isa = PBXGroup;
children = (
A21BFFAC1BFDCCE000F9FB54 /* Products */,
A21BFFA51BFDCC8800F9FB54 /* TLYShyNavBar */,
);
sourceTree = "<group>";
};
A21BFFA51BFDCC8800F9FB54 /* TLYShyNavBar */ = {
isa = PBXGroup;
children = (
A21B00051BFDD41900F9FB54 /* TLYShyNavBarFade.h */,
A21B00061BFDD41900F9FB54 /* TLYShyNavBarManager.h */,
A21B00071BFDD41900F9FB54 /* TLYShyNavBarManager.m */,
A21BFFDE1BFDD1A500F9FB54 /* Categories */,
A21BFFCD1BFDD18D00F9FB54 /* ShyControllers */,
A21BFFA61BFDCC8800F9FB54 /* TLYShyNavBar.h */,
A21BFFAD1BFDCD5100F9FB54 /* Supporting Files */,
);
path = TLYShyNavBar;
sourceTree = "<group>";
};
A21BFFAC1BFDCCE000F9FB54 /* Products */ = {
isa = PBXGroup;
children = (
A21BFFA41BFDCC8800F9FB54 /* TLYShyNavBar.framework */,
);
name = Products;
sourceTree = "<group>";
};
A21BFFAD1BFDCD5100F9FB54 /* Supporting Files */ = {
isa = PBXGroup;
children = (
A21BFFA81BFDCC8800F9FB54 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
A21BFFCD1BFDD18D00F9FB54 /* ShyControllers */ = {
isa = PBXGroup;
children = (
A21BFFF51BFDD41100F9FB54 /* TLYShyChild.h */,
A21BFFF61BFDD41100F9FB54 /* TLYShyParent.h */,
A21BFFF71BFDD41100F9FB54 /* TLYShyScrollViewController.h */,
A21BFFF81BFDD41100F9FB54 /* TLYShyScrollViewController.m */,
A21BFFF91BFDD41100F9FB54 /* TLYShyStatusBarController.h */,
A21BFFFA1BFDD41100F9FB54 /* TLYShyStatusBarController.m */,
A21BFFFB1BFDD41100F9FB54 /* TLYShyViewController.h */,
A21BFFFC1BFDD41100F9FB54 /* TLYShyViewController.m */,
);
name = ShyControllers;
sourceTree = "<group>";
};
A21BFFDE1BFDD1A500F9FB54 /* Categories */ = {
isa = PBXGroup;
children = (
A21BFFE51BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.h */,
A21BFFE61BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.m */,
A21BFFE71BFDD40800F9FB54 /* TLYDelegateProxy.h */,
A21BFFE81BFDD40800F9FB54 /* TLYDelegateProxy.m */,
A21BFFE91BFDD40800F9FB54 /* UIScrollView+Helpers.h */,
A21BFFEA1BFDD40800F9FB54 /* UIScrollView+Helpers.m */,
A21BFFEB1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.h */,
A21BFFEC1BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.m */,
);
name = Categories;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
A21BFFA11BFDCC8800F9FB54 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
A21BFFED1BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.h in Headers */,
A21B00091BFDD41900F9FB54 /* TLYShyNavBarManager.h in Headers */,
A21B00081BFDD41900F9FB54 /* TLYShyNavBarFade.h in Headers */,
A21B00011BFDD41100F9FB54 /* TLYShyStatusBarController.h in Headers */,
A21BFFF31BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.h in Headers */,
A21BFFFD1BFDD41100F9FB54 /* TLYShyChild.h in Headers */,
A21BFFEF1BFDD40800F9FB54 /* TLYDelegateProxy.h in Headers */,
A21BFFF11BFDD40800F9FB54 /* UIScrollView+Helpers.h in Headers */,
A21B00031BFDD41100F9FB54 /* TLYShyViewController.h in Headers */,
A21BFFFF1BFDD41100F9FB54 /* TLYShyScrollViewController.h in Headers */,
A21BFFA71BFDCC8800F9FB54 /* TLYShyNavBar.h in Headers */,
A21BFFFE1BFDD41100F9FB54 /* TLYShyParent.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
A21BFFA31BFDCC8800F9FB54 /* TLYShyNavBar */ = {
isa = PBXNativeTarget;
buildConfigurationList = A21BFFA91BFDCC8800F9FB54 /* Build configuration list for PBXNativeTarget "TLYShyNavBar" */;
buildPhases = (
A21BFF9F1BFDCC8800F9FB54 /* Sources */,
A21BFFA01BFDCC8800F9FB54 /* Frameworks */,
A21BFFA11BFDCC8800F9FB54 /* Headers */,
A21BFFA21BFDCC8800F9FB54 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TLYShyNavBar;
productName = TLYShyNavBar;
productReference = A21BFFA41BFDCC8800F9FB54 /* TLYShyNavBar.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
A21BFF721BFDCB3E00F9FB54 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0710;
TargetAttributes = {
A21BFFA31BFDCC8800F9FB54 = {
CreatedOnToolsVersion = 7.1.1;
};
};
};
buildConfigurationList = A21BFF751BFDCB3E00F9FB54 /* Build configuration list for PBXProject "TLYShyNavBar" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = A21BFF711BFDCB3E00F9FB54;
productRefGroup = A21BFF711BFDCB3E00F9FB54;
projectDirPath = "";
projectRoot = "";
targets = (
A21BFFA31BFDCC8800F9FB54 /* TLYShyNavBar */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
A21BFFA21BFDCC8800F9FB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
A21BFF9F1BFDCC8800F9FB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A21B00041BFDD41100F9FB54 /* TLYShyViewController.m in Sources */,
A21BFFF21BFDD40800F9FB54 /* UIScrollView+Helpers.m in Sources */,
A21B000A1BFDD41900F9FB54 /* TLYShyNavBarManager.m in Sources */,
A21BFFF41BFDD40800F9FB54 /* UIViewController+BetterLayoutGuides.m in Sources */,
A21BFFEE1BFDD40800F9FB54 /* NSObject+TLYSwizzlingHelpers.m in Sources */,
A21BFFF01BFDD40800F9FB54 /* TLYDelegateProxy.m in Sources */,
A21B00021BFDD41100F9FB54 /* TLYShyStatusBarController.m in Sources */,
A21B00001BFDD41100F9FB54 /* TLYShyScrollViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
A21BFF8D1BFDCB3E00F9FB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
A21BFF8E1BFDCB3E00F9FB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
A21BFFAA1BFDCC8800F9FB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CURRENT_PROJECT_VERSION = 1.0.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = TLYShyNavBar/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.telly.TLYShyNavBar;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
A21BFFAB1BFDCC8800F9FB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CURRENT_PROJECT_VERSION = 1.0.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = TLYShyNavBar/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.telly.TLYShyNavBar;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
A21BFF751BFDCB3E00F9FB54 /* Build configuration list for PBXProject "TLYShyNavBar" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A21BFF8D1BFDCB3E00F9FB54 /* Debug */,
A21BFF8E1BFDCB3E00F9FB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A21BFFA91BFDCC8800F9FB54 /* Build configuration list for PBXNativeTarget "TLYShyNavBar" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A21BFFAA1BFDCC8800F9FB54 /* Debug */,
A21BFFAB1BFDCC8800F9FB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = A21BFF721BFDCB3E00F9FB54 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TLYShyNavBar.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A21BFFA31BFDCC8800F9FB54"
BuildableName = "TLYShyNavBar.framework"
BlueprintName = "TLYShyNavBar"
ReferencedContainer = "container:TLYShyNavBar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A21BFF841BFDCB3E00F9FB54"
BuildableName = "TLYShyNavBarTests.xctest"
BlueprintName = "TLYShyNavBarTests"
ReferencedContainer = "container:TLYShyNavBar.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A21BFFA31BFDCC8800F9FB54"
BuildableName = "TLYShyNavBar.framework"
BlueprintName = "TLYShyNavBar"
ReferencedContainer = "container:TLYShyNavBar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A21BFFA31BFDCC8800F9FB54"
BuildableName = "TLYShyNavBar.framework"
BlueprintName = "TLYShyNavBar"
ReferencedContainer = "container:TLYShyNavBar.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A21BFFA31BFDCC8800F9FB54"
BuildableName = "TLYShyNavBar.framework"
BlueprintName = "TLYShyNavBar"
ReferencedContainer = "container:TLYShyNavBar.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,16 @@
//
// UIScrollView+Helpers.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIScrollView (Helpers)
- (void)tly_setInsets:(UIEdgeInsets)contentInsets preserveOffset:(BOOL)preserveOffset;
@end

View File

@ -0,0 +1,29 @@
//
// UIScrollView+Helpers.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "UIScrollView+Helpers.h"
@implementation UIScrollView (Helpers)
// Modify contentInset and scrollIndicatorInsets
- (void)tly_setInsets:(UIEdgeInsets)contentInsets preserveOffset:(BOOL)preserveOffset
{
if (preserveOffset && contentInsets.top != self.contentInset.top)
{
CGFloat offsetDelta = contentInsets.top - self.contentInset.top;
CGRect bounds = self.bounds;
bounds.origin.y -= offsetDelta;
self.bounds = bounds;
}
self.contentInset = contentInsets;
self.scrollIndicatorInsets = contentInsets;
}
@end

26
TLYShyNavBar/Info.plist Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,19 @@
//
// TLYShyChild.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#ifndef TLYShyChild_h
#define TLYShyChild_h
@protocol TLYShyChild <NSObject>
- (void)offsetCenterBy:(CGPoint)deltaPoint;
@end
#endif /* TLYShyChild_h */

View File

@ -0,0 +1,25 @@
//
// TLYShyParent.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#ifndef TLYShyParent_h
#define TLYShyParent_h
#import <UIKit/UIKit.h>
/** A shy parent can be asked for its maxY and height so the
* child can pin itself to the bottom and calculate the total
* height.
*/
@protocol TLYShyParent <NSObject>
- (CGFloat)maxYRelativeToView:(UIView *)superview;
- (CGFloat)calculateTotalHeightRecursively;
@end
#endif /* TLYShyParent_h */

View File

@ -0,0 +1,22 @@
//
// TLYShyScrollViewController.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TLYShyViewController.h"
#import "TLYShyParent.h"
#import "TLYShyChild.h"
@interface TLYShyScrollViewController : NSObject <TLYShyChild>
@property (nonatomic, weak) UIScrollView *scrollView;
@property (nonatomic, weak) TLYShyViewController *parent;
- (CGFloat)updateLayoutIfNeeded:(BOOL)intelligently;
@end

View File

@ -0,0 +1,55 @@
//
// TLYShyScrollViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "TLYShyScrollViewController.h"
#import "../Categories/UIScrollView+Helpers.h"
@implementation TLYShyScrollViewController
- (void)offsetCenterBy:(CGPoint)deltaPoint
{
[self updateLayoutIfNeeded:NO];
}
- (CGFloat)updateLayoutIfNeeded:(BOOL)intelligently
{
if (self.scrollView.contentSize.height < FLT_EPSILON
&& ([self.scrollView isKindOfClass:[UITableView class]]
|| [self.scrollView isKindOfClass:[UICollectionView class]])
)
{
return 0.f;
}
CGFloat parentMaxY = [self.parent maxYRelativeToView:self.scrollView.superview];
CGFloat normalizedY = parentMaxY - self.scrollView.frame.origin.y;
UIEdgeInsets insets = self.scrollView.contentInset;
insets.top = normalizedY;
if (normalizedY > -FLT_EPSILON && !UIEdgeInsetsEqualToEdgeInsets(insets, self.scrollView.contentInset))
{
CGFloat delta = insets.top - self.scrollView.contentInset.top;
[self.scrollView tly_setInsets:insets preserveOffset:intelligently];
return delta;
}
if (normalizedY < -FLT_EPSILON)
{
CGRect frame = self.scrollView.frame;
frame = UIEdgeInsetsInsetRect(frame, insets);
self.scrollView.frame = frame;
return [self updateLayoutIfNeeded:YES];
}
return 0.f;
}
@end

View File

@ -0,0 +1,17 @@
//
// TLYShyStatusBarController.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TLYShyParent.h"
@interface TLYShyStatusBarController : NSObject <TLYShyParent>
@property (nonatomic, weak) UIViewController *viewController;
@end

View File

@ -0,0 +1,68 @@
//
// TLYShyStatusBarController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "TLYShyStatusBarController.h"
// Thanks to SO user, MattDiPasquale
// http://stackoverflow.com/questions/12991935/how-to-programmatically-get-ios-status-bar-height/16598350#16598350
static inline CGFloat AACStatusBarHeight(UIViewController *viewController)
{
if ([UIApplication sharedApplication].statusBarHidden)
{
return 0.f;
}
// Modal views do not overlap the status bar, so no allowance need be made for it
CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
CGFloat statusBarHeight = MIN(statusBarSize.width, statusBarSize.height);
UIView *view = viewController.view;
CGRect frame = [view.superview convertRect:view.frame toView:view.window];
BOOL viewOverlapsStatusBar = frame.origin.y < statusBarHeight;
if (!viewOverlapsStatusBar)
{
return 0.f;
}
return statusBarHeight;
}
@implementation TLYShyStatusBarController
- (CGFloat)_statusBarHeight
{
CGFloat statusBarHeight = AACStatusBarHeight(self.viewController);
/* The standard status bar is 20 pixels. The navigation bar extends 20 pixels up so it is overlapped by the status bar.
* When there is a larger than 20 pixel status bar (e.g. a phone call is in progress or GPS is active), the center needs
* to shift up 20 pixels to avoid this 'dead space' being visible above the usual nav bar.
*/
if (statusBarHeight > 20)
{
statusBarHeight -= 20;
}
return statusBarHeight;
}
- (CGFloat)maxYRelativeToView:(UIView *)superview
{
return [self _statusBarHeight];
}
- (CGFloat)calculateTotalHeightRecursively
{
return [self _statusBarHeight];
}
@end

View File

@ -8,12 +8,17 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TLYShyParent.h"
#import "TLYShyChild.h"
#import "../TLYShyNavBarFade.h"
extern const CGFloat contractionVelocity;
typedef CGPoint(^TLYShyViewControllerExpandedCenterBlock)(UIView *view);
typedef CGFloat(^TLYShyViewControllerContractionAmountBlock)(UIView *view);
/* CLASS DESCRIPTION:
* ==================
* A shy view is a view that contracts when a scrolling event is
@ -25,21 +30,20 @@ typedef CGFloat(^TLYShyViewControllerContractionAmountBlock)(UIView *view);
* child to an already childified node is not supported.
*/
@interface TLYShyViewController : NSObject
@interface TLYShyViewController : NSObject <TLYShyChild>
@property (nonatomic, weak) TLYShyViewController *child;
@property (nonatomic, weak) id<TLYShyChild> child;
@property (nonatomic, weak) id<TLYShyParent> parent;
@property (nonatomic, weak) TLYShyViewController *subShyController;
@property (nonatomic, weak) UIView *view;
@property (nonatomic, copy) TLYShyViewControllerExpandedCenterBlock expandedCenter;
@property (nonatomic, copy) TLYShyViewControllerContractionAmountBlock contractionAmount;
@property (nonatomic) TLYShyNavBarFade fadeBehavior;
@property (nonatomic) BOOL hidesSubviews;
@property (nonatomic) BOOL hidesAfterContraction;
@property (nonatomic) BOOL alphaFadeEnabled;
@property (nonatomic, readonly) CGFloat totalHeight;
/* Sticky means it will always stay in expanded state
*/
@property (nonatomic) BOOL sticky;
- (void)offsetCenterBy:(CGPoint)deltaPoint;
- (CGFloat)updateYOffset:(CGFloat)deltaY;
- (CGFloat)snap:(BOOL)contract;
@ -48,3 +52,7 @@ typedef CGFloat(^TLYShyViewControllerContractionAmountBlock)(UIView *view);
- (CGFloat)contract;
@end
@interface TLYShyViewController (AsParent) <TLYShyParent>
@end

View File

@ -0,0 +1,245 @@
//
// TLYShyViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 6/14/14.
// Copyright (c) 2014 Telly, Inc. All rights reserved.
//
#import "TLYShyViewController.h"
@implementation TLYShyViewController (AsParent)
- (CGFloat)maxYRelativeToView:(UIView *)superview
{
CGPoint maxEdge = CGPointMake(0, CGRectGetHeight(self.view.bounds));
CGPoint normalizedMaxEdge = [superview convertPoint:maxEdge fromView:self.view];
return normalizedMaxEdge.y;
}
- (CGFloat)calculateTotalHeightRecursively
{
return CGRectGetHeight(self.view.bounds) + [self.parent calculateTotalHeightRecursively];
}
@end
@interface TLYShyViewController ()
@property (nonatomic, assign) CGPoint expandedCenterValue;
@property (nonatomic, assign) CGFloat contractionAmountValue;
@property (nonatomic, assign) CGPoint contractedCenterValue;
@property (nonatomic, assign) BOOL contracted;
@property (nonatomic, assign) BOOL expanded;
@end
@implementation TLYShyViewController
#pragma mark - Properties
// convenience
- (CGPoint)expandedCenterValue
{
CGPoint center = CGPointMake(CGRectGetMidX(self.view.bounds),
CGRectGetMidY(self.view.bounds));
center.y += [self.parent maxYRelativeToView:self.view.superview];
return center;
}
- (CGFloat)contractionAmountValue
{
return self.sticky ? 0.f : CGRectGetHeight(self.view.bounds);
}
- (CGPoint)contractedCenterValue
{
return CGPointMake(self.expandedCenterValue.x, self.expandedCenterValue.y - self.contractionAmountValue);
}
- (BOOL)contracted
{
return fabs(self.view.center.y - self.contractedCenterValue.y) < FLT_EPSILON;
}
- (BOOL)expanded
{
return fabs(self.view.center.y - self.expandedCenterValue.y) < FLT_EPSILON;
}
#pragma mark - Private methods
- (void)_onAlphaUpdate:(CGFloat)alpha
{
if (self.sticky)
{
self.view.alpha = 1.f;
[self _updateSubviewsAlpha:1.f];
return;
}
switch (self.fadeBehavior) {
case TLYShyNavBarFadeDisabled:
self.view.alpha = 1.f;
[self _updateSubviewsAlpha:1.f];
break;
case TLYShyNavBarFadeSubviews:
self.view.alpha = 1.f;
[self _updateSubviewsAlpha:alpha];
break;
case TLYShyNavBarFadeNavbar:
self.view.alpha = alpha;
[self _updateSubviewsAlpha:1.f];
break;
}
}
// This method is courtesy of GTScrollNavigationBar
// https://github.com/luugiathuy/GTScrollNavigationBar
- (void)_updateSubviewsAlpha:(CGFloat)alpha
{
for (UIView* view in self.view.subviews)
{
bool isBackgroundView = view == self.view.subviews[0];
bool isViewHidden = view.hidden || view.alpha < FLT_EPSILON;
if (!isBackgroundView && !isViewHidden)
{
view.alpha = alpha;
}
}
}
- (void)_updateCenter:(CGPoint)newCenter
{
CGPoint currentCenter = self.view.center;
CGPoint deltaPoint = CGPointMake(newCenter.x - currentCenter.x,
newCenter.y - currentCenter.y);
[self offsetCenterBy:deltaPoint];
}
#pragma mark - Public methods
- (void)setFadeBehavior:(TLYShyNavBarFade)fadeBehavior
{
_fadeBehavior = fadeBehavior;
if (fadeBehavior == TLYShyNavBarFadeDisabled)
{
[self _onAlphaUpdate:1.f];
}
}
- (void)offsetCenterBy:(CGPoint)deltaPoint
{
self.view.center = CGPointMake(self.view.center.x + deltaPoint.x,
self.view.center.y + deltaPoint.y);
[self.child offsetCenterBy:deltaPoint];
}
- (CGFloat)updateYOffset:(CGFloat)deltaY
{
if (self.subShyController && deltaY < 0)
{
deltaY = [self.subShyController updateYOffset:deltaY];
}
CGFloat residual = deltaY;
if (!self.sticky)
{
CGFloat newYOffset = self.view.center.y + deltaY;
CGFloat newYCenter = MAX(MIN(self.expandedCenterValue.y, newYOffset), self.contractedCenterValue.y);
[self _updateCenter:CGPointMake(self.expandedCenterValue.x, newYCenter)];
CGFloat newAlpha = 1.f - (self.expandedCenterValue.y - self.view.center.y) / self.contractionAmountValue;
newAlpha = MIN(MAX(FLT_EPSILON, newAlpha), 1.f);
[self _onAlphaUpdate:newAlpha];
residual = newYOffset - newYCenter;
// QUICK FIX: Only the extensionView is hidden
if (!self.subShyController)
{
self.view.hidden = residual < 0;
}
}
if (self.subShyController && deltaY > 0 && residual > 0)
{
residual = [self.subShyController updateYOffset:residual];
}
return residual;
}
- (CGFloat)snap:(BOOL)contract
{
/* "The Facebook" UX dictates that:
*
* 1 - When you contract:
* A - contract beyond the extension view -> contract the whole thing
* B - contract within the extension view -> expand the extension back
*
* 2 - When you expand:
* A - expand beyond the navbar -> expand the whole thing
* B - expand within the navbar -> contract the navbar back
*/
__block CGFloat deltaY;
[UIView animateWithDuration:0.2 animations:^
{
if ((contract && self.subShyController.contracted) || (!contract && !self.expanded))
{
deltaY = [self contract];
}
else
{
deltaY = [self.subShyController expand];
}
}];
return deltaY;
}
- (CGFloat)expand
{
self.view.hidden = NO;
[self _onAlphaUpdate:1.f];
CGFloat amountToMove = self.expandedCenterValue.y - self.view.center.y;
[self _updateCenter:self.expandedCenterValue];
[self.subShyController expand];
return amountToMove;
}
- (CGFloat)contract
{
CGFloat amountToMove = self.contractedCenterValue.y - self.view.center.y;
[self _onAlphaUpdate:FLT_EPSILON];
[self _updateCenter:self.contractedCenterValue];
[self.subShyController contract];
return amountToMove;
}
@end

View File

@ -0,0 +1,15 @@
//
// TLYShyNavBar.h
// TLYShyNavBar
//
#import <Foundation/Foundation.h>
//! Project version number for TLYShyNavBar.
FOUNDATION_EXPORT double TLYShyNavBarVersionNumber;
//! Project version string for TLYShyNavBar.
FOUNDATION_EXPORT const unsigned char TLYShyNavBarVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TLYShyNavBar/PublicHeader.h>
#import <TLYShyNavBar/TLYShyNavBarManager.h>

View File

@ -0,0 +1,21 @@
//
// TLYShyNavBarFade.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#ifndef TLYShyNavBarFade_h
#define TLYShyNavBarFade_h
/** This enum helps control the navigation bar fade behavior.
*/
typedef NS_ENUM(NSInteger, TLYShyNavBarFade) {
TLYShyNavBarFadeDisabled,
TLYShyNavBarFadeSubviews,
TLYShyNavBarFadeNavbar,
};
#endif /* TLYShyNavBarFade_h */

View File

@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TLYShyNavBarFade.h"
@protocol TLYShyNavBarManagerDelegate;
@ -22,7 +24,6 @@
* viewController.shyNavManager = ...;
*
*/
@interface TLYShyNavBarManager : NSObject
/* The view controller that is part of the navigation stack
@ -33,7 +34,7 @@
/* The scrollView subclass that will drive the contraction/expansion
* IMPORTANT: set this property AFTER assigning its delegate, if needed!
*/
@property (nonatomic, weak) UIScrollView *scrollView;
@property (nonatomic, strong) UIScrollView *scrollView;
/* The extension view to be shown beneath the navbar
*/
@ -44,17 +45,31 @@
*/
@property (nonatomic, readonly) CGRect extensionViewBounds;
/* Control the resistance when scrolling up/down before the navbar
/* Make the navigation bar stick to the top without collapsing
* Deatuls to NO
*/
@property (nonatomic) BOOL stickyNavigationBar;
/* Make the extension view stick to the bottom of the navbar without
* collapsing
* Defaults to NO
*/
@property (nonatomic) BOOL stickyExtensionView;
/* Control the resistance when scrolling up/down before the navbar
* expands/contracts again.
*/
@property (nonatomic) CGFloat expansionResistance; // default 200
@property (nonatomic) CGFloat contractionResistance; // default 0
/* Turn on or off the alpha fade as the navbar contracts/expands.
* Defaults to YES
/* Choose how the navbar fades as it contracts/expands.
* Defaults to FadeSubviews
*/
@property (nonatomic, getter = isAlphaFadeEnabled) BOOL alphaFadeEnabled;
@property (nonatomic) TLYShyNavBarFade fadeBehavior;
/* Set NO to disable shyNavBar behavior temporarily.
* Defaults to NO
*/
@property (nonatomic) BOOL disable;
/* Use this to be notified about contraction and expansion events.
@ -79,7 +94,7 @@
@end
/* CATEGORY DESCRIPTION:
/** CATEGORY DESCRIPTION:
* =====================
* The category described in the TLYShyNavBarManager usage, and it
* simply uses associated objects to attatch a TLYShyNavBar to the

View File

@ -7,64 +7,40 @@
//
#import "TLYShyNavBarManager.h"
#import "TLYShyViewController.h"
#import "TLYDelegateProxy.h"
#import "UIViewController+BetterLayoutGuides.h"
#import "NSObject+TLYSwizzlingHelpers.h"
#import "ShyControllers/TLYShyViewController.h"
#import "ShyControllers/TLYShyStatusBarController.h"
#import "ShyControllers/TLYShyScrollViewController.h"
#import "Categories/TLYDelegateProxy.h"
#import "Categories/UIViewController+BetterLayoutGuides.h"
#import "Categories/NSObject+TLYSwizzlingHelpers.h"
#import "Categories/UIScrollView+Helpers.h"
#import <objc/runtime.h>
#pragma mark - Helper functions
// Thanks to SO user, MattDiPasquale
// http://stackoverflow.com/questions/12991935/how-to-programmatically-get-ios-status-bar-height/16598350#16598350
static void * const kTLYShyNavBarManagerKVOContext = (void*)&kTLYShyNavBarManagerKVOContext;
static inline CGFloat AACStatusBarHeight()
{
if ([UIApplication sharedApplication].statusBarHidden)
{
return 0.f;
}
CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
return MIN(MIN(statusBarSize.width, statusBarSize.height), 20.0f);
}
@implementation UIScrollView(Helper)
// Modify contentInset and scrollIndicatorInsets while preserving visual content offset
- (void)tly_smartSetInsets:(UIEdgeInsets)contentAndScrollIndicatorInsets
{
if (contentAndScrollIndicatorInsets.top != self.contentInset.top)
{
CGPoint contentOffset = self.contentOffset;
contentOffset.y -= contentAndScrollIndicatorInsets.top - self.contentInset.top;
self.contentOffset = contentOffset;
}
self.contentInset = self.scrollIndicatorInsets = contentAndScrollIndicatorInsets;
}
@end
#pragma mark - TLYShyNavBarManager class
@interface TLYShyNavBarManager () <UIScrollViewDelegate>
@property (nonatomic, strong) id<TLYShyParent> statusBarController;
@property (nonatomic, strong) TLYShyViewController *navBarController;
@property (nonatomic, strong) TLYShyViewController *extensionController;
@property (nonatomic, strong) TLYShyScrollViewController *scrollViewController;
@property (nonatomic, strong) TLYDelegateProxy *delegateProxy;
@property (nonatomic, strong) UIView *extensionViewContainer;
@property (nonatomic) UIEdgeInsets previousScrollInsets;
@property (nonatomic) CGFloat previousYOffset;
@property (nonatomic) CGFloat resistanceConsumed;
@property (nonatomic, assign) CGFloat previousYOffset;
@property (nonatomic, assign) CGFloat resistanceConsumed;
@property (nonatomic, getter = isContracting) BOOL contracting;
@property (nonatomic) BOOL previousContractionState;
@property (nonatomic, assign) BOOL contracting;
@property (nonatomic, assign) BOOL previousContractionState;
@property (nonatomic, readonly) BOOL isViewControllerVisible;
@ -81,51 +57,39 @@ static inline CGFloat AACStatusBarHeight()
{
self.delegateProxy = [[TLYDelegateProxy alloc] initWithMiddleMan:self];
/* Initialize defaults */
self.contracting = NO;
self.previousContractionState = YES;
self.expansionResistance = 200.f;
self.contractionResistance = 0.f;
self.alphaFadeEnabled = YES;
self.previousScrollInsets = UIEdgeInsetsZero;
self.fadeBehavior = TLYShyNavBarFadeSubviews;
self.previousYOffset = NAN;
/* Initialize shy controllers */
self.statusBarController = [[TLYShyStatusBarController alloc] init];
self.scrollViewController = [[TLYShyScrollViewController alloc] init];
self.navBarController = [[TLYShyViewController alloc] init];
self.navBarController.hidesSubviews = YES;
self.navBarController.expandedCenter = ^(UIView *view)
{
return CGPointMake(CGRectGetMidX(view.bounds),
CGRectGetMidY(view.bounds) + AACStatusBarHeight());
};
self.navBarController.contractionAmount = ^(UIView *view)
{
return CGRectGetHeight(view.bounds);
};
self.extensionViewContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100.f, 0.f)];
self.extensionViewContainer.backgroundColor = [UIColor clearColor];
self.extensionViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleBottomMargin;
self.extensionController = [[TLYShyViewController alloc] init];
self.extensionController.view = self.extensionViewContainer;
self.extensionController.hidesAfterContraction = YES;
self.extensionController.contractionAmount = ^(UIView *view)
{
return CGRectGetHeight(view.bounds);
};
__weak __typeof(self) weakSelf = self;
self.extensionController.expandedCenter = ^(UIView *view)
{
return CGPointMake(CGRectGetMidX(view.bounds),
CGRectGetMidY(view.bounds) + weakSelf.viewController.tly_topLayoutGuide.length);
};
/* hierarchy setup */
/* StatusBar <-- navbar <-->> extension <--> scrollView
*/
self.navBarController.parent = self.statusBarController;
self.navBarController.child = self.extensionController;
self.navBarController.subShyController = self.extensionController;
self.extensionController.parent = self.navBarController;
self.extensionController.child = self.scrollViewController;
self.scrollViewController.parent = self.extensionController;
/* Notification helpers */
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationDidBecomeActive:)
name:UIApplicationDidBecomeActiveNotification
@ -148,6 +112,7 @@ static inline CGFloat AACStatusBarHeight()
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_scrollView removeObserver:self forKeyPath:@"contentSize" context:kTLYShyNavBarManagerKVOContext];
}
#pragma mark - Properties
@ -156,9 +121,17 @@ static inline CGFloat AACStatusBarHeight()
{
_viewController = viewController;
UIView *navbar = viewController.navigationController.navigationBar;
NSAssert(navbar != nil, @"You are using the component wrong... Please see the README file.");
if ([viewController isKindOfClass:[UITableViewController class]]
|| [viewController.view isKindOfClass:[UITableViewController class]])
{
NSLog(@"*** WARNING: Please consider using a UIViewController with a UITableView as a subview ***");
}
UIView *navbar = viewController.navigationController.navigationBar;
NSAssert(navbar != nil, @"Please make sure the viewController is already attached to a navigation controller.");
viewController.extendedLayoutIncludesOpaqueBars = YES;
[self.extensionViewContainer removeFromSuperview];
[self.viewController.view addSubview:self.extensionViewContainer];
@ -169,21 +142,26 @@ static inline CGFloat AACStatusBarHeight()
- (void)setScrollView:(UIScrollView *)scrollView
{
[_scrollView removeObserver:self forKeyPath:@"contentSize" context:kTLYShyNavBarManagerKVOContext];
if (_scrollView.delegate == self.delegateProxy)
{
_scrollView.delegate = self.delegateProxy.originalDelegate;
}
_scrollView = scrollView;
self.scrollViewController.scrollView = scrollView;
if (_scrollView.delegate != self.delegateProxy)
{
self.delegateProxy.originalDelegate = _scrollView.delegate;
_scrollView.delegate = (id)self.delegateProxy;
}
[self cleanup];
[self layoutViews];
[_scrollView addObserver:self forKeyPath:@"contentSize" options:0 context:kTLYShyNavBarManagerKVOContext];
}
- (CGRect)extensionViewBounds
@ -210,20 +188,44 @@ static inline CGFloat AACStatusBarHeight()
}
}
- (BOOL)stickyNavigationBar
{
return self.navBarController.sticky;
}
- (void)setStickyNavigationBar:(BOOL)stickyNavigationBar
{
self.navBarController.sticky = stickyNavigationBar;
}
- (BOOL)stickyExtensionView
{
return self.extensionController.sticky;
}
- (void)setStickyExtensionView:(BOOL)stickyExtensionView
{
self.extensionController.sticky = stickyExtensionView;
}
#pragma mark - Private methods
- (BOOL)_scrollViewIsSuffecientlyLong
{
CGRect scrollFrame = UIEdgeInsetsInsetRect(self.scrollView.bounds, self.scrollView.contentInset);
CGFloat scrollableAmount = self.scrollView.contentSize.height - CGRectGetHeight(scrollFrame);
return (scrollableAmount > [self.extensionController calculateTotalHeightRecursively]);
}
- (BOOL)_shouldHandleScrolling
{
if (self.disable)
{
return NO;
}
CGRect scrollFrame = UIEdgeInsetsInsetRect(self.scrollView.bounds, self.scrollView.contentInset);
CGFloat scrollableAmount = self.scrollView.contentSize.height - CGRectGetHeight(scrollFrame);
BOOL scrollViewIsSuffecientlyLong = (scrollableAmount > self.navBarController.totalHeight);
return (self.isViewControllerVisible && scrollViewIsSuffecientlyLong);
return (self.isViewControllerVisible && [self _scrollViewIsSuffecientlyLong]);
}
- (void)_handleScrolling
@ -242,7 +244,7 @@ static inline CGFloat AACStatusBarHeight()
CGFloat start = -self.scrollView.contentInset.top;
if (self.previousYOffset < start)
{
deltaY = MIN(0, deltaY - self.previousYOffset - start);
deltaY = MIN(0, deltaY - (self.previousYOffset - start));
}
/* rounding to resolve a dumb issue with the contentOffset value */
@ -259,21 +261,26 @@ static inline CGFloat AACStatusBarHeight()
}
// 4 - Check if contracting state changed, and do stuff if so
if (self.isContracting != self.previousContractionState)
if (self.contracting != self.previousContractionState)
{
self.previousContractionState = self.isContracting;
self.previousContractionState = self.contracting;
self.resistanceConsumed = 0;
}
// GTH: Calculate the exact point to avoid expansion resistance
// CGFloat statusBarHeight = [self.statusBarController calculateTotalHeightRecursively];
// 5 - Apply resistance
if (self.isContracting)
// 5.1 - Always apply resistance when contracting
if (self.contracting)
{
CGFloat availableResistance = self.contractionResistance - self.resistanceConsumed;
self.resistanceConsumed = MIN(self.contractionResistance, self.resistanceConsumed - deltaY);
deltaY = MIN(0, availableResistance + deltaY);
}
else if (self.scrollView.contentOffset.y > -AACStatusBarHeight())
// 5.2 - Only apply resistance if expanding above the status bar
else if (self.scrollView.contentOffset.y > 0)
{
CGFloat availableResistance = self.expansionResistance - self.resistanceConsumed;
self.resistanceConsumed = MIN(self.expansionResistance, self.resistanceConsumed + deltaY);
@ -281,27 +288,11 @@ static inline CGFloat AACStatusBarHeight()
deltaY = MAX(0, deltaY - availableResistance);
}
// 6 - Update the shyViewController
self.navBarController.alphaFadeEnabled = self.alphaFadeEnabled;
// 6 - Update the navigation bar shyViewController
self.navBarController.fadeBehavior = self.fadeBehavior;
[self.navBarController updateYOffset:deltaY];
// 7 - Update the scroll view's scrollIndicatorInsets, if changed
UIEdgeInsets scrollInsets = self.scrollView.contentInset;
CGFloat maxNavY = CGRectGetMaxY(self.navBarController.view.frame);
CGFloat maxExtensionY = CGRectGetMaxY(self.extensionViewContainer.frame);
if (self.extensionViewContainer.hidden) {
scrollInsets.top = maxNavY;
} else {
scrollInsets.top = MAX(maxNavY, maxExtensionY);
}
if (!UIEdgeInsetsEqualToEdgeInsets(self.scrollView.scrollIndicatorInsets, scrollInsets)) {
if (scrollInsets.top == AACStatusBarHeight()) {
if ([self.delegate respondsToSelector:@selector(shyNavBarManagerDidBecomeFullyContracted:)]) {
[self.delegate shyNavBarManagerDidBecomeFullyContracted:self];
}
}
self.scrollView.scrollIndicatorInsets = scrollInsets;
}
}
self.previousYOffset = self.scrollView.contentOffset.y;
@ -315,29 +306,27 @@ static inline CGFloat AACStatusBarHeight()
}
self.resistanceConsumed = 0;
CGFloat deltaY = [self.navBarController snap:self.isContracting];
CGPoint newContentOffset = self.scrollView.contentOffset;
newContentOffset.y -= deltaY;
[self.navBarController snap:self.contracting];
}
__weak typeof(self) weakSelf = self;
[UIView animateWithDuration:0.2
animations:^{
weakSelf.scrollView.contentOffset = newContentOffset;
}
completion:^(BOOL finished) {
typeof(weakSelf) strongSelf = weakSelf;
if (strongSelf.isContracting) {
if ([strongSelf.delegate respondsToSelector:@selector(shyNavBarManagerDidFinishContracting:)]) {
[strongSelf.delegate shyNavBarManagerDidFinishContracting:strongSelf];
}
} else {
if ([strongSelf.delegate respondsToSelector:@selector(shyNavBarManagerDidFinishExpanding:)]) {
[strongSelf.delegate shyNavBarManagerDidFinishExpanding:strongSelf];
}
}
}];
#pragma mark - KVO
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
{
if (context == kTLYShyNavBarManagerKVOContext)
{
if (self.isViewControllerVisible && ![self _scrollViewIsSuffecientlyLong])
{
[self.navBarController expand];
}
}
else
{
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
}
#pragma mark - public methods
@ -356,8 +345,14 @@ static inline CGFloat AACStatusBarHeight()
self.extensionViewContainer.frame = bounds;
[self.extensionViewContainer addSubview:view];
self.extensionViewContainer.userInteractionEnabled = view.userInteractionEnabled;
/* Disable scroll handling temporarily while laying out views to avoid double-changing content
* offsets in _handleScrolling. */
BOOL wasDisabled = self.disable;
self.disable = YES;
[self layoutViews];
self.disable = wasDisabled;
}
}
@ -368,28 +363,17 @@ static inline CGFloat AACStatusBarHeight()
- (void)layoutViews
{
UIEdgeInsets scrollInsets = self.scrollView.contentInset;
scrollInsets.top = CGRectGetHeight(self.extensionViewContainer.bounds) + self.viewController.tly_topLayoutGuide.length;
if (UIEdgeInsetsEqualToEdgeInsets(scrollInsets, self.previousScrollInsets))
if (fabs([self.scrollViewController updateLayoutIfNeeded:YES]) > FLT_EPSILON)
{
return;
[self.navBarController expand];
[self.extensionViewContainer.superview bringSubviewToFront:self.extensionViewContainer];
}
self.previousScrollInsets = scrollInsets;
[self.navBarController expand];
[self.extensionViewContainer.superview bringSubviewToFront:self.extensionViewContainer];
[self.scrollView tly_smartSetInsets:scrollInsets];
}
- (void)cleanup
{
[self.navBarController expand];
self.previousYOffset = NAN;
self.previousScrollInsets = UIEdgeInsetsZero;
}
#pragma mark - UIScrollViewDelegate methods
@ -407,6 +391,12 @@ static inline CGFloat AACStatusBarHeight()
}
}
- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
{
[self.scrollView scrollRectToVisible:CGRectMake(0,0,1,1) animated:YES];
[self.scrollView flashScrollIndicators];
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
[self _handleScrollingEnded];

View File

@ -1,181 +0,0 @@
//
// TLYShyViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 6/14/14.
// Copyright (c) 2014 Telly, Inc. All rights reserved.
//
#import "TLYShyViewController.h"
const CGFloat contractionVelocity = 300.f;
@interface TLYShyViewController ()
@property (nonatomic) CGPoint expandedCenterValue;
@property (nonatomic) CGFloat contractionAmountValue;
@property (nonatomic) CGPoint contractedCenterValue;
@property (nonatomic, getter = isContracted) BOOL contracted;
@property (nonatomic, getter = isExpanded) BOOL expanded;
@end
@implementation TLYShyViewController
#pragma mark - Properties
// convenience
- (CGPoint)expandedCenterValue
{
return self.expandedCenter(self.view);
}
- (CGFloat)contractionAmountValue
{
return self.contractionAmount(self.view);
}
- (CGPoint)contractedCenterValue
{
return CGPointMake(self.expandedCenterValue.x, self.expandedCenterValue.y - self.contractionAmountValue);
}
- (BOOL)isContracted
{
return fabs(self.view.center.y - self.contractedCenterValue.y) < FLT_EPSILON;
}
- (BOOL)isExpanded
{
return fabs(self.view.center.y - self.expandedCenterValue.y) < FLT_EPSILON;
}
- (CGFloat)totalHeight
{
return self.child.totalHeight + (self.expandedCenterValue.y - self.contractedCenterValue.y);
}
#pragma mark - Private methods
// This method is courtesy of GTScrollNavigationBar
// https://github.com/luugiathuy/GTScrollNavigationBar
- (void)_updateSubviewsToAlpha:(CGFloat)alpha
{
for (UIView* view in self.view.subviews)
{
bool isBackgroundView = view == self.view.subviews[0];
bool isViewHidden = view.hidden || view.alpha < FLT_EPSILON;
if (!isBackgroundView && !isViewHidden)
{
view.alpha = alpha;
}
}
}
#pragma mark - Public methods
- (void)setAlphaFadeEnabled:(BOOL)alphaFadeEnabled
{
_alphaFadeEnabled = alphaFadeEnabled;
if (!alphaFadeEnabled)
{
[self _updateSubviewsToAlpha:1.f];
}
}
- (CGFloat)updateYOffset:(CGFloat)deltaY
{
if (self.child && deltaY < 0)
{
deltaY = [self.child updateYOffset:deltaY];
self.child.view.hidden = (deltaY) < 0;
}
CGFloat newYOffset = self.view.center.y + deltaY;
CGFloat newYCenter = MAX(MIN(self.expandedCenterValue.y, newYOffset), self.contractedCenterValue.y);
self.view.center = CGPointMake(self.expandedCenterValue.x, newYCenter);
if (self.hidesSubviews)
{
CGFloat newAlpha = 1.f - (self.expandedCenterValue.y - self.view.center.y) / self.contractionAmountValue;
newAlpha = MIN(MAX(FLT_EPSILON, newAlpha), 1.f);
if (self.alphaFadeEnabled)
{
[self _updateSubviewsToAlpha:newAlpha];
}
}
CGFloat residual = newYOffset - newYCenter;
if (self.child && deltaY > 0 && residual > 0)
{
residual = [self.child updateYOffset:residual];
self.child.view.hidden = residual - (newYOffset - newYCenter) > FLT_EPSILON;
}
return residual;
}
- (CGFloat)snap:(BOOL)contract
{
/* "The Facebook" UX dictates that:
*
* 1 - When you contract:
* A - contract beyond the extension view -> contract the whole thing
* B - contract within the extension view -> expand the extension back
*
* 2 - When you expand:
* A - expand beyond the navbar -> expand the whole thing
* B - expand within the navbar -> contract the navbar back
*/
__block CGFloat deltaY;
[UIView animateWithDuration:0.2 animations:^
{
if ((contract && self.child.isContracted) || (!contract && !self.isExpanded))
{
deltaY = [self contract];
}
else
{
deltaY = [self.child expand];
}
}];
return deltaY;
}
- (CGFloat)expand
{
self.view.hidden = NO;
if (self.hidesSubviews && self.alphaFadeEnabled)
{
[self _updateSubviewsToAlpha:1.f];
}
CGFloat amountToMove = self.expandedCenterValue.y - self.view.center.y;
self.view.center = self.expandedCenterValue;
[self.child expand];
return amountToMove;
}
- (CGFloat)contract
{
CGFloat amountToMove = self.contractedCenterValue.y - self.view.center.y;
self.view.center = self.contractedCenterValue;
[self.child contract];
return amountToMove;
}
@end

View File

@ -7,7 +7,14 @@
objects = {
/* Begin PBXBuildFile section */
8268FA02194C926F004EC0E4 /* TLYShyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8268FA01194C926F004EC0E4 /* TLYShyViewController.m */; };
821A4D771BF6CCEC00E675DB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 821A4D761BF6CCEC00E675DB /* LaunchScreen.storyboard */; };
821A4D7B1BF6D01600E675DB /* TLYTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D7A1BF6D01600E675DB /* TLYTableViewController.m */; };
821A4D7F1BF6D70100E675DB /* TLYShyStatusBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D7E1BF6D70100E675DB /* TLYShyStatusBarController.m */; };
821A4D841BF6D89E00E675DB /* TLYShyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D831BF6D89E00E675DB /* TLYShyViewController.m */; };
821A4D881BF6DA2700E675DB /* UIScrollView+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D871BF6DA2700E675DB /* UIScrollView+Helpers.m */; };
821A4D8B1BF6E5D400E675DB /* TLYDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D8A1BF6E5D400E675DB /* TLYDelegateProxy.m */; };
821A4D901BF6F3DF00E675DB /* TLYShyScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 821A4D8F1BF6F3DF00E675DB /* TLYShyScrollViewController.m */; };
8262C8551BD730DD00B610A0 /* TLYCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8262C8541BD730DD00B610A0 /* TLYCollectionViewController.m */; };
8268FA13194DBA58004EC0E4 /* TLYShyNavBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8268FA12194DBA58004EC0E4 /* TLYShyNavBarManager.m */; };
828F57201949C37B009EB8DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 828F571F1949C37B009EB8DD /* Foundation.framework */; };
828F57221949C37B009EB8DD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 828F57211949C37B009EB8DD /* CoreGraphics.framework */; };
@ -24,7 +31,7 @@
828F57491949C37B009EB8DD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 828F57471949C37B009EB8DD /* InfoPlist.strings */; };
828F574B1949C37B009EB8DD /* TLYShyNavBarDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 828F574A1949C37B009EB8DD /* TLYShyNavBarDemoTests.m */; };
829FEE001957DF620017E186 /* NSObject+TLYSwizzlingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 829FEDFF1957DF620017E186 /* NSObject+TLYSwizzlingHelpers.m */; };
82B01ED3195D449F00C3C10C /* TLYDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 82B01ED2195D449F00C3C10C /* TLYDelegateProxy.m */; };
82A893861BC6F939004C37E3 /* TLYMenuTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 82A893851BC6F939004C37E3 /* TLYMenuTableViewController.m */; };
82C882091955FDA60046C49D /* UIViewController+BetterLayoutGuides.m in Sources */ = {isa = PBXBuildFile; fileRef = 82C882081955FDA60046C49D /* UIViewController+BetterLayoutGuides.m */; };
/* End PBXBuildFile section */
@ -39,8 +46,24 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
8268FA00194C926F004EC0E4 /* TLYShyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyViewController.h; sourceTree = "<group>"; };
8268FA01194C926F004EC0E4 /* TLYShyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyViewController.m; sourceTree = "<group>"; };
821A4D761BF6CCEC00E675DB /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
821A4D791BF6D01600E675DB /* TLYTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYTableViewController.h; sourceTree = "<group>"; };
821A4D7A1BF6D01600E675DB /* TLYTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYTableViewController.m; sourceTree = "<group>"; };
821A4D7D1BF6D70100E675DB /* TLYShyStatusBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyStatusBarController.h; sourceTree = "<group>"; };
821A4D7E1BF6D70100E675DB /* TLYShyStatusBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyStatusBarController.m; sourceTree = "<group>"; };
821A4D801BF6D72900E675DB /* TLYShyParent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLYShyParent.h; sourceTree = "<group>"; };
821A4D821BF6D89E00E675DB /* TLYShyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyViewController.h; sourceTree = "<group>"; };
821A4D831BF6D89E00E675DB /* TLYShyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyViewController.m; sourceTree = "<group>"; };
821A4D861BF6DA2700E675DB /* UIScrollView+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+Helpers.h"; sourceTree = "<group>"; };
821A4D871BF6DA2700E675DB /* UIScrollView+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+Helpers.m"; sourceTree = "<group>"; };
821A4D891BF6E5D400E675DB /* TLYDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYDelegateProxy.h; sourceTree = "<group>"; };
821A4D8A1BF6E5D400E675DB /* TLYDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYDelegateProxy.m; sourceTree = "<group>"; };
821A4D8C1BF6E5F300E675DB /* TLYShyNavBarFade.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarFade.h; sourceTree = "<group>"; };
821A4D8D1BF6EDE800E675DB /* TLYShyChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLYShyChild.h; sourceTree = "<group>"; };
821A4D8E1BF6F3DF00E675DB /* TLYShyScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyScrollViewController.h; sourceTree = "<group>"; };
821A4D8F1BF6F3DF00E675DB /* TLYShyScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyScrollViewController.m; sourceTree = "<group>"; };
8262C8531BD730DD00B610A0 /* TLYCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYCollectionViewController.h; sourceTree = "<group>"; };
8262C8541BD730DD00B610A0 /* TLYCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYCollectionViewController.m; sourceTree = "<group>"; };
8268FA11194DBA58004EC0E4 /* TLYShyNavBarManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarManager.h; sourceTree = "<group>"; };
8268FA12194DBA58004EC0E4 /* TLYShyNavBarManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyNavBarManager.m; sourceTree = "<group>"; };
828F571C1949C37B009EB8DD /* TLYShyNavBarDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TLYShyNavBarDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -64,8 +87,8 @@
828F574A1949C37B009EB8DD /* TLYShyNavBarDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TLYShyNavBarDemoTests.m; sourceTree = "<group>"; };
829FEDFE1957DF620017E186 /* NSObject+TLYSwizzlingHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+TLYSwizzlingHelpers.h"; sourceTree = "<group>"; };
829FEDFF1957DF620017E186 /* NSObject+TLYSwizzlingHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+TLYSwizzlingHelpers.m"; sourceTree = "<group>"; };
82B01ED1195D449F00C3C10C /* TLYDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYDelegateProxy.h; sourceTree = "<group>"; };
82B01ED2195D449F00C3C10C /* TLYDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYDelegateProxy.m; sourceTree = "<group>"; };
82A893841BC6F939004C37E3 /* TLYMenuTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYMenuTableViewController.h; sourceTree = "<group>"; };
82A893851BC6F939004C37E3 /* TLYMenuTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYMenuTableViewController.m; sourceTree = "<group>"; };
82C882071955FDA60046C49D /* UIViewController+BetterLayoutGuides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+BetterLayoutGuides.h"; sourceTree = "<group>"; };
82C882081955FDA60046C49D /* UIViewController+BetterLayoutGuides.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+BetterLayoutGuides.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -94,6 +117,39 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
821A4D781BF6CFF200E675DB /* TableView */ = {
isa = PBXGroup;
children = (
821A4D791BF6D01600E675DB /* TLYTableViewController.h */,
821A4D7A1BF6D01600E675DB /* TLYTableViewController.m */,
);
name = TableView;
sourceTree = "<group>";
};
821A4D7C1BF6D6D200E675DB /* ShyControllers */ = {
isa = PBXGroup;
children = (
821A4D801BF6D72900E675DB /* TLYShyParent.h */,
821A4D8D1BF6EDE800E675DB /* TLYShyChild.h */,
821A4D7D1BF6D70100E675DB /* TLYShyStatusBarController.h */,
821A4D7E1BF6D70100E675DB /* TLYShyStatusBarController.m */,
821A4D821BF6D89E00E675DB /* TLYShyViewController.h */,
821A4D831BF6D89E00E675DB /* TLYShyViewController.m */,
821A4D8E1BF6F3DF00E675DB /* TLYShyScrollViewController.h */,
821A4D8F1BF6F3DF00E675DB /* TLYShyScrollViewController.m */,
);
path = ShyControllers;
sourceTree = "<group>";
};
8262C8521BD730CB00B610A0 /* CollectionView */ = {
isa = PBXGroup;
children = (
8262C8531BD730DD00B610A0 /* TLYCollectionViewController.h */,
8262C8541BD730DD00B610A0 /* TLYCollectionViewController.m */,
);
name = CollectionView;
sourceTree = "<group>";
};
828F57131949C37B009EB8DD = {
isa = PBXGroup;
children = (
@ -128,9 +184,13 @@
828F57251949C37B009EB8DD /* TLYShyNavBarDemo */ = {
isa = PBXGroup;
children = (
821A4D781BF6CFF200E675DB /* TableView */,
8262C8521BD730CB00B610A0 /* CollectionView */,
828F572E1949C37B009EB8DD /* TLYAppDelegate.h */,
828F572F1949C37B009EB8DD /* TLYAppDelegate.m */,
828F57311949C37B009EB8DD /* Main.storyboard */,
82A893841BC6F939004C37E3 /* TLYMenuTableViewController.h */,
82A893851BC6F939004C37E3 /* TLYMenuTableViewController.m */,
828F57341949C37B009EB8DD /* TLYViewController.h */,
828F57351949C37B009EB8DD /* TLYViewController.m */,
828F57371949C37B009EB8DD /* Images.xcassets */,
@ -143,6 +203,7 @@
isa = PBXGroup;
children = (
828F57271949C37B009EB8DD /* TLYShyNavBarDemo-Info.plist */,
821A4D761BF6CCEC00E675DB /* LaunchScreen.storyboard */,
828F57281949C37B009EB8DD /* InfoPlist.strings */,
828F572B1949C37B009EB8DD /* main.m */,
828F572D1949C37B009EB8DD /* TLYShyNavBarDemo-Prefix.pch */,
@ -171,13 +232,11 @@
828F57541949C381009EB8DD /* TLYShyNavBar */ = {
isa = PBXGroup;
children = (
821A4D7C1BF6D6D200E675DB /* ShyControllers */,
82B01EDB195D580000C3C10C /* Categories */,
821A4D8C1BF6E5F300E675DB /* TLYShyNavBarFade.h */,
8268FA11194DBA58004EC0E4 /* TLYShyNavBarManager.h */,
8268FA12194DBA58004EC0E4 /* TLYShyNavBarManager.m */,
8268FA00194C926F004EC0E4 /* TLYShyViewController.h */,
8268FA01194C926F004EC0E4 /* TLYShyViewController.m */,
82B01ED1195D449F00C3C10C /* TLYDelegateProxy.h */,
82B01ED2195D449F00C3C10C /* TLYDelegateProxy.m */,
);
name = TLYShyNavBar;
path = ../TLYShyNavBar;
@ -186,10 +245,14 @@
82B01EDB195D580000C3C10C /* Categories */ = {
isa = PBXGroup;
children = (
821A4D891BF6E5D400E675DB /* TLYDelegateProxy.h */,
821A4D8A1BF6E5D400E675DB /* TLYDelegateProxy.m */,
82C882071955FDA60046C49D /* UIViewController+BetterLayoutGuides.h */,
82C882081955FDA60046C49D /* UIViewController+BetterLayoutGuides.m */,
829FEDFE1957DF620017E186 /* NSObject+TLYSwizzlingHelpers.h */,
829FEDFF1957DF620017E186 /* NSObject+TLYSwizzlingHelpers.m */,
821A4D861BF6DA2700E675DB /* UIScrollView+Helpers.h */,
821A4D871BF6DA2700E675DB /* UIScrollView+Helpers.m */,
);
path = Categories;
sourceTree = "<group>";
@ -239,7 +302,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = TLY;
LastUpgradeCheck = 0510;
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Telly, Inc.";
TargetAttributes = {
828F573C1949C37B009EB8DD = {
@ -272,6 +335,7 @@
buildActionMask = 2147483647;
files = (
828F57381949C37B009EB8DD /* Images.xcassets in Resources */,
821A4D771BF6CCEC00E675DB /* LaunchScreen.storyboard in Resources */,
828F572A1949C37B009EB8DD /* InfoPlist.strings in Resources */,
828F57331949C37B009EB8DD /* Main.storyboard in Resources */,
);
@ -292,14 +356,20 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
82A893861BC6F939004C37E3 /* TLYMenuTableViewController.m in Sources */,
821A4D8B1BF6E5D400E675DB /* TLYDelegateProxy.m in Sources */,
821A4D7B1BF6D01600E675DB /* TLYTableViewController.m in Sources */,
8268FA13194DBA58004EC0E4 /* TLYShyNavBarManager.m in Sources */,
82C882091955FDA60046C49D /* UIViewController+BetterLayoutGuides.m in Sources */,
821A4D7F1BF6D70100E675DB /* TLYShyStatusBarController.m in Sources */,
828F57301949C37B009EB8DD /* TLYAppDelegate.m in Sources */,
82B01ED3195D449F00C3C10C /* TLYDelegateProxy.m in Sources */,
8268FA02194C926F004EC0E4 /* TLYShyViewController.m in Sources */,
829FEE001957DF620017E186 /* NSObject+TLYSwizzlingHelpers.m in Sources */,
821A4D901BF6F3DF00E675DB /* TLYShyScrollViewController.m in Sources */,
828F57361949C37B009EB8DD /* TLYViewController.m in Sources */,
821A4D841BF6D89E00E675DB /* TLYShyViewController.m in Sources */,
8262C8551BD730DD00B610A0 /* TLYCollectionViewController.m in Sources */,
828F572C1949C37B009EB8DD /* main.m in Sources */,
821A4D881BF6DA2700E675DB /* UIScrollView+Helpers.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -367,6 +437,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@ -427,6 +498,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TLYShyNavBarDemo/TLYShyNavBarDemo-Prefix.pch";
INFOPLIST_FILE = "TLYShyNavBarDemo/TLYShyNavBarDemo-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@ -440,6 +512,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TLYShyNavBarDemo/TLYShyNavBarDemo-Prefix.pch";
INFOPLIST_FILE = "TLYShyNavBarDemo/TLYShyNavBarDemo-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@ -461,6 +534,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "TLYShyNavBarDemoTests/TLYShyNavBarDemoTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
@ -479,6 +553,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TLYShyNavBarDemo/TLYShyNavBarDemo-Prefix.pch";
INFOPLIST_FILE = "TLYShyNavBarDemoTests/TLYShyNavBarDemoTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;

View File

@ -11,17 +11,17 @@
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>58D55ECABAD5AAEB583BB3898420091CC2A418B2</key>
<string>ssh://github.com/telly/TLYShyNavBar.git</string>
<string>github.com:telly/TLYShyNavBar.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>TLYShyNavBarDemo/TLYShyNavBarDemo.xcodeproj/project.xcworkspace</string>
<string>TLYShyNavBarDemo/TLYShyNavBarDemo.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>58D55ECABAD5AAEB583BB3898420091CC2A418B2</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>ssh://github.com/telly/TLYShyNavBar.git</string>
<string>github.com:telly/TLYShyNavBar.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="XGk-6h-chh">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="7bU-2Z-BIA">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@ -18,15 +20,12 @@
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d0u-JZ-WMw">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="RWp-Z1-nNI">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="RWp-Z1-nNI">
<rect key="frame" x="0.0" y="0.0" width="320" height="800"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RdB-YX-eef">
<rect key="frame" x="35" y="201" width="250" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="Push View Controller">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
@ -36,6 +35,12 @@
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="RWp-Z1-nNI" secondAttribute="bottom" constant="-232" id="A4N-1N-ByC"/>
<constraint firstItem="RWp-Z1-nNI" firstAttribute="top" secondItem="d0u-JZ-WMw" secondAttribute="top" id="Aws-4X-zhy"/>
<constraint firstItem="RWp-Z1-nNI" firstAttribute="leading" secondItem="d0u-JZ-WMw" secondAttribute="leading" id="I70-Es-KW4"/>
<constraint firstAttribute="trailing" secondItem="RWp-Z1-nNI" secondAttribute="trailing" id="nUd-mM-q10"/>
</constraints>
<connections>
<outlet property="delegate" destination="vXZ-lx-hvc" id="kxr-NG-k4Q"/>
</connections>
@ -57,33 +62,606 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="397" y="-204"/>
<point key="canvasLocation" x="-1" y="-532"/>
</scene>
<!--Title-->
<scene sceneID="iUm-Up-GyM">
<objects>
<tableViewController id="bXL-dd-VeI" customClass="TLYMenuTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="B8e-nC-EPc">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="0" textLabel="aqG-vx-7ht" style="IBUITableViewCellStyleDefault" id="RGY-hR-OFV">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="RGY-hR-OFV" id="XWF-ra-5eA">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="General Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aqG-vx-7ht">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="vXZ-lx-hvc" kind="push" id="iFx-zx-Yj8"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="1" textLabel="2GL-4f-xic" style="IBUITableViewCellStyleDefault" id="dRT-27-ySW">
<rect key="frame" x="0.0" y="130" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dRT-27-ySW" id="cDy-Ba-zBy">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="No Extension View Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2GL-4f-xic">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="Vir-3r-RAn" kind="push" id="8Qt-p1-3tA"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="2" textLabel="WdW-Lh-Cfs" style="IBUITableViewCellStyleDefault" id="TTx-eK-xUp">
<rect key="frame" x="0.0" y="174" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TTx-eK-xUp" id="N2A-N5-eQc">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Sticky Extension Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WdW-Lh-Cfs">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="K7e-Au-F1w" kind="push" id="BJ5-fT-FrY"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="3" textLabel="WIt-Sx-VLk" style="IBUITableViewCellStyleDefault" id="0y3-Aj-VEQ">
<rect key="frame" x="0.0" y="218" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0y3-Aj-VEQ" id="w1B-en-E0m">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Sticky Navbar Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WIt-Sx-VLk">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="7f1-kX-LN4" kind="push" id="YcG-cM-tuL"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="4" textLabel="7pe-uQ-9XE" style="IBUITableViewCellStyleDefault" id="CJy-qF-mnS">
<rect key="frame" x="0.0" y="262" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="CJy-qF-mnS" id="nYc-co-8cU">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Fade Navbar Test" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7pe-uQ-9XE">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="YrI-BX-jJR" kind="push" id="6AH-6S-diz"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="5" textLabel="qz8-f8-ztz" style="IBUITableViewCellStyleDefault" id="cog-xO-RM8">
<rect key="frame" x="0.0" y="306" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cog-xO-RM8" id="bqe-Oi-QQK">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Test UITableView" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qz8-f8-ztz">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="jai-8C-KhC" kind="push" id="jib-YH-I4H"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="6" textLabel="JCj-eZ-ePK" style="IBUITableViewCellStyleDefault" id="lDx-31-RTM">
<rect key="frame" x="0.0" y="350" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lDx-31-RTM" id="Pch-9t-ngw">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Test UICollectionView" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="JCj-eZ-ePK">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="4gk-yU-wN3" kind="push" id="POL-mj-jIP"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="7" textLabel="CgM-Go-0Tl" style="IBUITableViewCellStyleDefault" id="iMg-k0-Aaw">
<rect key="frame" x="0.0" y="394" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iMg-k0-Aaw" id="5e1-WH-Lge">
<rect key="frame" x="0.0" y="0.0" width="287" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Test Short ScrollView" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CgM-Go-0Tl">
<rect key="frame" x="15" y="0.0" width="270" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="aW5-sR-mZf" kind="push" id="2z9-bH-jBE"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="bXL-dd-VeI" id="OLi-uA-4je"/>
<outlet property="delegate" destination="bXL-dd-VeI" id="RHJ-6l-PeV"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Title" id="hzz-9a-rn9">
<barButtonItem key="rightBarButtonItem" title="😏" id="57S-h4-ET8">
<connections>
<action selector="translucencyToggled:" destination="bXL-dd-VeI" id="0Uk-Xe-2RZ"/>
</connections>
</barButtonItem>
</navigationItem>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ixv-On-SGD" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-528" y="-207"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="77F-I9-Peg">
<scene sceneID="S2w-0i-fXE">
<objects>
<navigationController definesPresentationContext="YES" id="XGk-6h-chh" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="k3v-VM-xiB">
<navigationController id="7bU-2Z-BIA" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="hsP-pn-cyS">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="myR-Px-RqD"/>
<segue destination="bXL-dd-VeI" kind="relationship" relationship="rootViewController" id="vEc-sn-o6s"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="aBF-PB-KsZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="nO0-RE-ecN" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-167" y="-204"/>
<point key="canvasLocation" x="-976" y="-207"/>
</scene>
<!--View Controller-->
<scene sceneID="ihW-nn-bmc">
<objects>
<viewController id="K7e-Au-F1w" customClass="TLYViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="qnt-p7-hNQ"/>
<viewControllerLayoutGuide type="bottom" id="bsQ-uV-4lF"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="egF-wj-hKz">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vbb-xa-3sQ">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="ZgL-2W-u0P">
<rect key="frame" x="0.0" y="0.0" width="320" height="800"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tCN-lm-psW">
<rect key="frame" x="35" y="201" width="250" height="35"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="Push View Controller">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="K7e-Au-F1w" kind="push" id="aee-5n-du9"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="ZgL-2W-u0P" firstAttribute="top" secondItem="vbb-xa-3sQ" secondAttribute="top" id="Gog-4t-mWr"/>
<constraint firstAttribute="trailing" secondItem="ZgL-2W-u0P" secondAttribute="trailing" id="HRx-CS-Oza"/>
<constraint firstItem="ZgL-2W-u0P" firstAttribute="leading" secondItem="vbb-xa-3sQ" secondAttribute="leading" id="UXV-wK-XtE"/>
<constraint firstAttribute="bottom" secondItem="ZgL-2W-u0P" secondAttribute="bottom" constant="-232" id="vRu-ew-sLd"/>
</constraints>
<connections>
<outlet property="delegate" destination="K7e-Au-F1w" id="Ljb-VD-J2V"/>
</connections>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="vbb-xa-3sQ" secondAttribute="trailing" id="AsA-NG-wRj"/>
<constraint firstItem="bsQ-uV-4lF" firstAttribute="bottom" secondItem="vbb-xa-3sQ" secondAttribute="bottom" id="VgX-hg-4Fl"/>
<constraint firstItem="vbb-xa-3sQ" firstAttribute="top" secondItem="qnt-p7-hNQ" secondAttribute="bottom" constant="-64" id="XRu-Vc-ewp"/>
<constraint firstItem="vbb-xa-3sQ" firstAttribute="leading" secondItem="egF-wj-hKz" secondAttribute="leading" id="wSn-ux-0Hv"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="AVx-FV-4DI"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="stickyExtensionView" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="imageView" destination="ZgL-2W-u0P" id="RNQ-8U-bVE"/>
<outlet property="scrollView" destination="vbb-xa-3sQ" id="DTH-hw-DUy"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="PDI-vm-1dr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="783" y="-532"/>
</scene>
<!--Collection View Controller-->
<scene sceneID="PhO-85-s6k">
<objects>
<collectionViewController id="4gk-yU-wN3" customClass="TLYCollectionViewController" sceneMemberID="viewController">
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="Kig-Vq-sPc">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.97254901959999995" green="0.97254901959999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="vIy-T8-j61">
<size key="itemSize" width="320" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="mxc-A2-oU2">
<rect key="frame" x="0.0" y="64" width="320" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" tag="777" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Vf-lE-VWT">
<rect key="frame" x="8" y="14" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<constraints>
<constraint firstAttribute="leadingMargin" secondItem="0Vf-lE-VWT" secondAttribute="leading" id="hNm-aF-Ss8"/>
<constraint firstItem="0Vf-lE-VWT" firstAttribute="centerY" secondItem="mxc-A2-oU2" secondAttribute="centerY" id="lhQ-IH-0UI"/>
</constraints>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="4gk-yU-wN3" id="22b-GS-Mud"/>
<outlet property="delegate" destination="4gk-yU-wN3" id="e1K-0B-2eC"/>
</connections>
</collectionView>
<navigationItem key="navigationItem" id="TxI-1J-d2i"/>
</collectionViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="rvW-nN-PLP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1016" y="566"/>
</scene>
<!--Table View Controller-->
<scene sceneID="XaB-vN-5Qi">
<objects>
<viewController id="jai-8C-KhC" customClass="TLYTableViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="XjM-9z-Uam"/>
<viewControllerLayoutGuide type="bottom" id="sgb-uZ-rF7"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="MSO-HM-o3C">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="zXM-Us-jtQ">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" id="NX5-B0-7pf">
<rect key="frame" x="0.0" y="92" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="NX5-B0-7pf" id="ITe-rA-1zD">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="jai-8C-KhC" id="9EV-wK-KXA"/>
<outlet property="delegate" destination="jai-8C-KhC" id="WN1-JN-N1W"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="l8b-W3-Ehj"/>
<connections>
<outlet property="tableView" destination="zXM-Us-jtQ" id="1OR-fS-EoQ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="37F-q7-Zc2" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-670" y="566"/>
</scene>
<!--View Controller-->
<scene sceneID="WAx-ee-jTN">
<objects>
<viewController id="YrI-BX-jJR" customClass="TLYViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="DHM-Gk-tqL"/>
<viewControllerLayoutGuide type="bottom" id="C58-Th-iEg"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="bIK-rM-GKC">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Zp-9c-eDS">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="ZOG-dK-zfA">
<rect key="frame" x="0.0" y="0.0" width="320" height="800"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cyG-i1-1i9">
<rect key="frame" x="35" y="201" width="250" height="35"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="Push View Controller">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="YrI-BX-jJR" kind="push" id="SoT-YH-GuX"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="ZOG-dK-zfA" firstAttribute="top" secondItem="6Zp-9c-eDS" secondAttribute="top" id="Del-af-CgC"/>
<constraint firstItem="ZOG-dK-zfA" firstAttribute="leading" secondItem="6Zp-9c-eDS" secondAttribute="leading" id="KYS-x9-Jad"/>
<constraint firstAttribute="trailing" secondItem="ZOG-dK-zfA" secondAttribute="trailing" id="SMj-gB-5vd"/>
<constraint firstAttribute="bottom" secondItem="ZOG-dK-zfA" secondAttribute="bottom" constant="-232" id="kj5-VT-Ir7"/>
</constraints>
<connections>
<outlet property="delegate" destination="YrI-BX-jJR" id="UNz-BN-zMp"/>
</connections>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="6Zp-9c-eDS" firstAttribute="leading" secondItem="bIK-rM-GKC" secondAttribute="leading" id="jYt-f8-td7"/>
<constraint firstAttribute="trailing" secondItem="6Zp-9c-eDS" secondAttribute="trailing" id="m9n-CK-LOx"/>
<constraint firstItem="6Zp-9c-eDS" firstAttribute="top" secondItem="DHM-Gk-tqL" secondAttribute="bottom" constant="-64" id="mfk-qB-xH0"/>
<constraint firstItem="C58-Th-iEg" firstAttribute="bottom" secondItem="6Zp-9c-eDS" secondAttribute="bottom" id="x7r-5H-Z1p"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="bfK-Vd-9Jp"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="stickyExtensionView" value="NO"/>
<userDefinedRuntimeAttribute type="number" keyPath="fadeBehavior">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="imageView" destination="ZOG-dK-zfA" id="BIT-2G-AhJ"/>
<outlet property="scrollView" destination="6Zp-9c-eDS" id="qiT-l8-wEe"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="7sq-nV-lml" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1" y="208"/>
</scene>
<!--View Controller-->
<scene sceneID="zcE-h0-aq3">
<objects>
<viewController id="7f1-kX-LN4" customClass="TLYViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="pUV-UO-fri"/>
<viewControllerLayoutGuide type="bottom" id="POi-6q-Jdv"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="eOj-4e-h2Z">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p6u-pz-ec0">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="iiY-8B-e2T">
<rect key="frame" x="0.0" y="0.0" width="320" height="800"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sz2-8s-bu4">
<rect key="frame" x="35" y="201" width="250" height="35"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="Push View Controller">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="7f1-kX-LN4" kind="push" id="WRD-ac-CcU"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="iiY-8B-e2T" secondAttribute="trailing" id="cJU-Wz-K3u"/>
<constraint firstAttribute="bottom" secondItem="iiY-8B-e2T" secondAttribute="bottom" constant="-232" id="rBn-gA-pFx"/>
<constraint firstItem="iiY-8B-e2T" firstAttribute="top" secondItem="p6u-pz-ec0" secondAttribute="top" id="t6e-3c-mYy"/>
<constraint firstItem="iiY-8B-e2T" firstAttribute="leading" secondItem="p6u-pz-ec0" secondAttribute="leading" id="yxg-zM-6BO"/>
</constraints>
<connections>
<outlet property="delegate" destination="7f1-kX-LN4" id="Em9-iO-CRq"/>
</connections>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="p6u-pz-ec0" firstAttribute="top" secondItem="pUV-UO-fri" secondAttribute="bottom" constant="-64" id="A23-5t-IBv"/>
<constraint firstItem="POi-6q-Jdv" firstAttribute="bottom" secondItem="p6u-pz-ec0" secondAttribute="bottom" id="Jo6-Mp-8tk"/>
<constraint firstItem="p6u-pz-ec0" firstAttribute="leading" secondItem="eOj-4e-h2Z" secondAttribute="leading" id="MTL-4R-N3X"/>
<constraint firstAttribute="trailing" secondItem="p6u-pz-ec0" secondAttribute="trailing" id="N2z-x2-V6b"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="VGK-r1-atg"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="stickyExtensionView" value="NO"/>
<userDefinedRuntimeAttribute type="number" keyPath="fadeBehavior">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="stickyNavigationBar" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="imageView" destination="iiY-8B-e2T" id="lSi-xq-DXH"/>
<outlet property="scrollView" destination="p6u-pz-ec0" id="jPl-rq-FFo"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Wqb-OT-maY" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="363" y="208"/>
</scene>
<!--View Controller-->
<scene sceneID="bYR-xs-cnr">
<objects>
<viewController id="Vir-3r-RAn" customClass="TLYViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="BkE-Iq-z6J"/>
<viewControllerLayoutGuide type="bottom" id="8Is-wZ-9BQ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="0Ja-Wx-zy2">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gDa-ud-MJA">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sample" translatesAutoresizingMaskIntoConstraints="NO" id="53M-22-p92">
<rect key="frame" x="0.0" y="0.0" width="320" height="800"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vdy-g9-wQL">
<rect key="frame" x="35" y="201" width="250" height="35"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<state key="normal" title="Push View Controller">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="Vir-3r-RAn" kind="push" id="fbQ-WQ-fvM"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="53M-22-p92" firstAttribute="leading" secondItem="gDa-ud-MJA" secondAttribute="leading" id="4Nm-kW-QPn"/>
<constraint firstAttribute="bottom" secondItem="53M-22-p92" secondAttribute="bottom" constant="-232" id="5Mh-2b-a9D"/>
<constraint firstItem="53M-22-p92" firstAttribute="top" secondItem="gDa-ud-MJA" secondAttribute="top" id="76q-JF-l7d"/>
<constraint firstAttribute="trailing" secondItem="53M-22-p92" secondAttribute="trailing" id="zr2-9G-qlL"/>
</constraints>
<connections>
<outlet property="delegate" destination="Vir-3r-RAn" id="zC7-46-HJO"/>
</connections>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="gDa-ud-MJA" secondAttribute="trailing" id="0pa-sw-lVw"/>
<constraint firstItem="8Is-wZ-9BQ" firstAttribute="bottom" secondItem="gDa-ud-MJA" secondAttribute="bottom" id="T0T-Y0-yyw"/>
<constraint firstItem="gDa-ud-MJA" firstAttribute="top" secondItem="BkE-Iq-z6J" secondAttribute="bottom" constant="-64" id="WcX-jW-FEV"/>
<constraint firstItem="gDa-ud-MJA" firstAttribute="leading" secondItem="0Ja-Wx-zy2" secondAttribute="leading" id="s51-Ms-zqo"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="ocA-JK-sul"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="disableExtensionView" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="imageView" destination="53M-22-p92" id="uxa-AD-vUc"/>
<outlet property="scrollView" destination="gDa-ud-MJA" id="w2M-m2-Cbo"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W0g-zW-htj" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="363" y="-532"/>
</scene>
<!--Table View Controller-->
<scene sceneID="RYz-v8-651">
<objects>
<viewController id="aW5-sR-mZf" customClass="TLYTableViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="2aT-xe-cs2"/>
<viewControllerLayoutGuide type="bottom" id="PvV-4v-hBz"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Trg-X5-aIb">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Nlh-YW-jQ7">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" id="jHM-wp-EHl">
<rect key="frame" x="0.0" y="92" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jHM-wp-EHl" id="mGW-Ao-Srl">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="aW5-sR-mZf" id="9EX-wv-kBv"/>
<outlet property="delegate" destination="aW5-sR-mZf" id="CHy-8R-ufT"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="uJw-Uj-Sb1"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="shortScrollView" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="tableView" destination="Nlh-YW-jQ7" id="Wk4-94-eKC"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="OFV-VU-PLS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-331" y="566"/>
</scene>
</scenes>
<resources>
<image name="sample" width="320" height="800"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="myR-Px-RqD"/>
<segue reference="iFx-zx-Yj8"/>
<segue reference="YcG-cM-tuL"/>
<segue reference="6AH-6S-diz"/>
<segue reference="8Qt-p1-3tA"/>
<segue reference="BJ5-fT-FrY"/>
</inferredMetricsTieBreakers>
</document>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright © 2015 Telly, Inc. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="20" y="559" width="560" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TLYShyNavBarDemo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="20" y="180" width="560" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,13 @@
//
// TLYCollectionViewController.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 10/20/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TLYCollectionViewController : UICollectionViewController
@end

View File

@ -0,0 +1,74 @@
//
// TLYCollectionViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 10/20/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "TLYCollectionViewController.h"
@interface TLYCollectionViewController ()
@property (nonatomic, strong) NSArray *data;
@end
@implementation TLYCollectionViewController
static NSString * const reuseIdentifier = @"Cell";
- (void)viewDidLoad {
[super viewDidLoad];
self.data = @[@"No Game No Life",
@"Ookami Kodomo no Ame to Yuki",
@"Owari no Seraph",
@"Prince of Tennis",
@"Psycho-Pass",
@"Psycho-Pass 2",
@"School Rumble",
@"Sen to Chihiro no Kamikakushi",
@"Shijou Saikyou no Deshi Kenichi",
@"Shingeki no Kyojin",
@"Soul Eater",
@"Steins;Gate",
@"Summer Wars",
@"Sword Art Online",
@"Sword Art Online II",
@"Tenkuu no Shiro Laputa",
@"Toki wo Kakeru Shoujo",
@"Tokyo Ghoul",
@"Tonari no Totoro",
@"Uchuu Kyoudai",
@"Yakitate!! Japan",
@"Zankyou ",
];
UIView *view = view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 40.f)];
view.backgroundColor = [UIColor redColor];
/* Library code */
self.shyNavBarManager.scrollView = self.collectionView;
/* Can then be remove by setting the ExtensionView to nil */
[self.shyNavBarManager setExtensionView:view];
}
#pragma mark <UICollectionViewDataSource>
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.data.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
UILabel *label = (id)[cell viewWithTag:777];
label.text = self.data[indexPath.item];
return cell;
}
@end

View File

@ -0,0 +1,13 @@
//
// TLYMenuTableViewController.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 10/8/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TLYMenuTableViewController : UITableViewController
@end

View File

@ -0,0 +1,51 @@
//
// TLYMenuTableViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 10/8/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "TLYMenuTableViewController.h"
@interface TLYMenuTableViewController ()
@end
@implementation TLYMenuTableViewController
#pragma mark - Init & Dealloc
- (instancetype)initWithCoder:(NSCoder *)coder
{
self = [super initWithCoder:coder];
if (self) {
self.title = @"Features";
}
return self;
}
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 8;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellId = [@(indexPath.row) stringValue];
return [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
}
#pragma mark - Action methods
- (IBAction)translucencyToggled:(id)sender
{
BOOL translucent = !self.navigationController.navigationBar.translucent;
self.navigationController.navigationBar.translucent = translucent;
[sender setTitle:translucent ? @"😏" : @"😎"];
}
@end

View File

@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.telly.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>

View File

@ -0,0 +1,13 @@
//
// TLYTableViewController.h
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TLYTableViewController : UIViewController
@end

View File

@ -0,0 +1,63 @@
//
// TLYTableViewController.m
// TLYShyNavBarDemo
//
// Created by Mazyad Alabduljaleel on 11/13/15.
// Copyright © 2015 Telly, Inc. All rights reserved.
//
#import "TLYTableViewController.h"
@interface TLYTableViewController () <UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, assign) IBInspectable BOOL shortScrollView;
@property (nonatomic, weak) IBOutlet UITableView *tableView;
@end
@implementation TLYTableViewController
#pragma mark - View Life Cycle
- (void)viewDidLoad
{
[super viewDidLoad];
UIView *view = view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 40.f)];
view.backgroundColor = [UIColor redColor];
/* Library code */
self.shyNavBarManager.scrollView = self.tableView;
/* Can then be remove by setting the ExtensionView to nil */
[self.shyNavBarManager setExtensionView:view];
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return self.shortScrollView ? 1 : 6;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 5;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @"Section Header";
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"
forIndexPath:indexPath];
cell.textLabel.text = @"Sample Data";
return cell;
}
@end

View File

@ -10,6 +10,11 @@
@interface TLYViewController ()
@property (nonatomic, assign) IBInspectable BOOL disableExtensionView;
@property (nonatomic, assign) IBInspectable BOOL stickyNavigationBar;
@property (nonatomic, assign) IBInspectable BOOL stickyExtensionView;
@property (nonatomic, assign) IBInspectable NSInteger fadeBehavior;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@ -17,26 +22,54 @@
@implementation TLYViewController
#pragma mark - Init & Dealloc
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
self.disableExtensionView = NO;
self.stickyNavigationBar = NO;
self.stickyExtensionView = NO;
self.fadeBehavior = TLYShyNavBarFadeSubviews;
self.title = @"WTFox Say";
}
return self;
}
#pragma mark - View Life Cycle
- (void)viewDidLoad
{
[super viewDidLoad];
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 44.f)];
view.backgroundColor = [UIColor redColor];
UIView *view = nil;
if (!self.disableExtensionView)
{
view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 40.f)];
view.backgroundColor = [UIColor redColor];
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = view.bounds;
[button addTarget:self action:@selector(extensionViewTapped:) forControlEvents:UIControlEventTouchUpInside];
[button setTitle:@"Click Me!" forState:UIControlStateNormal];
[view addSubview:button];
}
/* Library code */
self.shyNavBarManager.scrollView = self.scrollView;
/* Can then be remove by setting the ExtensionView to nil */
[self.shyNavBarManager setExtensionView:view];
/* Make navbar stick to the top */
[self.shyNavBarManager setStickyNavigationBar:self.stickyNavigationBar];
/* Make the extension view stick to the top */
[self.shyNavBarManager setStickyExtensionView:self.stickyExtensionView];
/* Navigation bar fade behavior */
[self.shyNavBarManager setFadeBehavior:self.fadeBehavior];
}
- (void)viewDidLayoutSubviews
@ -45,4 +78,11 @@
self.scrollView.contentSize = self.imageView.bounds.size;
}
#pragma mark - Action methods
- (void)extensionViewTapped:(id)sender
{
[[[UIAlertView alloc] initWithTitle:@"it works" message:nil delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil] show];
}
@end

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.telly.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>

View File

@ -3,14 +3,12 @@
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Acktie, LLC. All rights reserved.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
#ifndef TLYShyNavBarSwiftDemo_Bridging_Header_h
#define TLYShyNavBarSwiftDemo_Bridging_Header_h
#import "TLYShyNavBarManager.h"
#import "TLYShyViewController.h"
#import "TLYDelegateProxy.h"
#import "NSObject+TLYSwizzlingHelpers.h"
#import "UIViewController+BetterLayoutGuides.h"
#endif

View File

@ -7,17 +7,20 @@
objects = {
/* Begin PBXBuildFile section */
826F866D1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F865A1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m */; };
826F866E1BF8123D000F9216 /* TLYDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F865C1BF8123D000F9216 /* TLYDelegateProxy.m */; };
826F866F1BF8123D000F9216 /* UIScrollView+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F865E1BF8123D000F9216 /* UIScrollView+Helpers.m */; };
826F86701BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F86601BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m */; };
826F86711BF8123D000F9216 /* TLYShyScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F86651BF8123D000F9216 /* TLYShyScrollViewController.m */; };
826F86721BF8123D000F9216 /* TLYShyStatusBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F86671BF8123D000F9216 /* TLYShyStatusBarController.m */; };
826F86731BF8123D000F9216 /* TLYShyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F86691BF8123D000F9216 /* TLYShyViewController.m */; };
826F86741BF8123D000F9216 /* TLYShyNavBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 826F866C1BF8123D000F9216 /* TLYShyNavBarManager.m */; };
E7ADE6101A99A83B00E8F95C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE60F1A99A83B00E8F95C /* AppDelegate.swift */; };
E7ADE6151A99A83B00E8F95C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E7ADE6131A99A83B00E8F95C /* Main.storyboard */; };
E7ADE6171A99A83B00E8F95C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7ADE6161A99A83B00E8F95C /* Images.xcassets */; };
E7ADE61A1A99A83B00E8F95C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E7ADE6181A99A83B00E8F95C /* LaunchScreen.xib */; };
E7ADE6261A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE6251A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.swift */; };
E7ADE6421A99AB5800E8F95C /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE6411A99AB5800E8F95C /* TableViewController.swift */; };
E7ADE64F1A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE6461A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.m */; };
E7ADE6501A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE6481A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.m */; };
E7ADE6511A9A6F7C00E8F95C /* TLYDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE64A1A9A6F7C00E8F95C /* TLYDelegateProxy.m */; };
E7ADE6521A9A6F7C00E8F95C /* TLYShyNavBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE64C1A9A6F7C00E8F95C /* TLYShyNavBarManager.m */; };
E7ADE6531A9A6F7C00E8F95C /* TLYShyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E7ADE64E1A9A6F7C00E8F95C /* TLYShyViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -31,6 +34,25 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
826F86591BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+TLYSwizzlingHelpers.h"; sourceTree = "<group>"; };
826F865A1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+TLYSwizzlingHelpers.m"; sourceTree = "<group>"; };
826F865B1BF8123D000F9216 /* TLYDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYDelegateProxy.h; sourceTree = "<group>"; };
826F865C1BF8123D000F9216 /* TLYDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYDelegateProxy.m; sourceTree = "<group>"; };
826F865D1BF8123D000F9216 /* UIScrollView+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+Helpers.h"; sourceTree = "<group>"; };
826F865E1BF8123D000F9216 /* UIScrollView+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+Helpers.m"; sourceTree = "<group>"; };
826F865F1BF8123D000F9216 /* UIViewController+BetterLayoutGuides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+BetterLayoutGuides.h"; sourceTree = "<group>"; };
826F86601BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+BetterLayoutGuides.m"; sourceTree = "<group>"; };
826F86621BF8123D000F9216 /* TLYShyChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyChild.h; sourceTree = "<group>"; };
826F86631BF8123D000F9216 /* TLYShyParent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyParent.h; sourceTree = "<group>"; };
826F86641BF8123D000F9216 /* TLYShyScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyScrollViewController.h; sourceTree = "<group>"; };
826F86651BF8123D000F9216 /* TLYShyScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyScrollViewController.m; sourceTree = "<group>"; };
826F86661BF8123D000F9216 /* TLYShyStatusBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyStatusBarController.h; sourceTree = "<group>"; };
826F86671BF8123D000F9216 /* TLYShyStatusBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyStatusBarController.m; sourceTree = "<group>"; };
826F86681BF8123D000F9216 /* TLYShyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyViewController.h; sourceTree = "<group>"; };
826F86691BF8123D000F9216 /* TLYShyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyViewController.m; sourceTree = "<group>"; };
826F866A1BF8123D000F9216 /* TLYShyNavBarFade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarFade.h; sourceTree = "<group>"; };
826F866B1BF8123D000F9216 /* TLYShyNavBarManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarManager.h; sourceTree = "<group>"; };
826F866C1BF8123D000F9216 /* TLYShyNavBarManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyNavBarManager.m; sourceTree = "<group>"; };
E7ADE60A1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TLYShyNavBarSwiftDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
E7ADE60E1A99A83B00E8F95C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E7ADE60F1A99A83B00E8F95C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@ -42,16 +64,6 @@
E7ADE6251A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TLYShyNavBarSwiftDemoTests.swift; sourceTree = "<group>"; };
E7ADE6401A99A86600E8F95C /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
E7ADE6411A99AB5800E8F95C /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
E7ADE6451A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+TLYSwizzlingHelpers.h"; sourceTree = "<group>"; };
E7ADE6461A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+TLYSwizzlingHelpers.m"; sourceTree = "<group>"; };
E7ADE6471A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+BetterLayoutGuides.h"; sourceTree = "<group>"; };
E7ADE6481A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+BetterLayoutGuides.m"; sourceTree = "<group>"; };
E7ADE6491A9A6F7C00E8F95C /* TLYDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYDelegateProxy.h; sourceTree = "<group>"; };
E7ADE64A1A9A6F7C00E8F95C /* TLYDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYDelegateProxy.m; sourceTree = "<group>"; };
E7ADE64B1A9A6F7C00E8F95C /* TLYShyNavBarManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyNavBarManager.h; sourceTree = "<group>"; };
E7ADE64C1A9A6F7C00E8F95C /* TLYShyNavBarManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyNavBarManager.m; sourceTree = "<group>"; };
E7ADE64D1A9A6F7C00E8F95C /* TLYShyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLYShyViewController.h; sourceTree = "<group>"; };
E7ADE64E1A9A6F7C00E8F95C /* TLYShyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLYShyViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -72,11 +84,54 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
826F86571BF8123D000F9216 /* TLYShyNavBar */ = {
isa = PBXGroup;
children = (
826F86581BF8123D000F9216 /* Categories */,
826F86611BF8123D000F9216 /* ShyControllers */,
826F866A1BF8123D000F9216 /* TLYShyNavBarFade.h */,
826F866B1BF8123D000F9216 /* TLYShyNavBarManager.h */,
826F866C1BF8123D000F9216 /* TLYShyNavBarManager.m */,
);
name = TLYShyNavBar;
path = ../TLYShyNavBar;
sourceTree = "<group>";
};
826F86581BF8123D000F9216 /* Categories */ = {
isa = PBXGroup;
children = (
826F86591BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.h */,
826F865A1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m */,
826F865B1BF8123D000F9216 /* TLYDelegateProxy.h */,
826F865C1BF8123D000F9216 /* TLYDelegateProxy.m */,
826F865D1BF8123D000F9216 /* UIScrollView+Helpers.h */,
826F865E1BF8123D000F9216 /* UIScrollView+Helpers.m */,
826F865F1BF8123D000F9216 /* UIViewController+BetterLayoutGuides.h */,
826F86601BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m */,
);
path = Categories;
sourceTree = "<group>";
};
826F86611BF8123D000F9216 /* ShyControllers */ = {
isa = PBXGroup;
children = (
826F86621BF8123D000F9216 /* TLYShyChild.h */,
826F86631BF8123D000F9216 /* TLYShyParent.h */,
826F86641BF8123D000F9216 /* TLYShyScrollViewController.h */,
826F86651BF8123D000F9216 /* TLYShyScrollViewController.m */,
826F86661BF8123D000F9216 /* TLYShyStatusBarController.h */,
826F86671BF8123D000F9216 /* TLYShyStatusBarController.m */,
826F86681BF8123D000F9216 /* TLYShyViewController.h */,
826F86691BF8123D000F9216 /* TLYShyViewController.m */,
);
path = ShyControllers;
sourceTree = "<group>";
};
E7ADE6011A99A83B00E8F95C = {
isa = PBXGroup;
children = (
E7ADE6401A99A86600E8F95C /* Bridging-Header.h */,
E7ADE6431A9A6F7C00E8F95C /* TLYShyNavBar */,
826F86571BF8123D000F9216 /* TLYShyNavBar */,
E7ADE60C1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */,
E7ADE6221A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests */,
E7ADE60B1A99A83B00E8F95C /* Products */,
@ -130,32 +185,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
E7ADE6431A9A6F7C00E8F95C /* TLYShyNavBar */ = {
isa = PBXGroup;
children = (
E7ADE6441A9A6F7C00E8F95C /* Categories */,
E7ADE6491A9A6F7C00E8F95C /* TLYDelegateProxy.h */,
E7ADE64A1A9A6F7C00E8F95C /* TLYDelegateProxy.m */,
E7ADE64B1A9A6F7C00E8F95C /* TLYShyNavBarManager.h */,
E7ADE64C1A9A6F7C00E8F95C /* TLYShyNavBarManager.m */,
E7ADE64D1A9A6F7C00E8F95C /* TLYShyViewController.h */,
E7ADE64E1A9A6F7C00E8F95C /* TLYShyViewController.m */,
);
name = TLYShyNavBar;
path = ../TLYShyNavBar;
sourceTree = "<group>";
};
E7ADE6441A9A6F7C00E8F95C /* Categories */ = {
isa = PBXGroup;
children = (
E7ADE6451A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.h */,
E7ADE6461A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.m */,
E7ADE6471A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.h */,
E7ADE6481A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.m */,
);
path = Categories;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -200,7 +229,8 @@
E7ADE6021A99A83B00E8F95C /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Acktie, LLC";
TargetAttributes = {
E7ADE6091A99A83B00E8F95C = {
@ -256,13 +286,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E7ADE6531A9A6F7C00E8F95C /* TLYShyViewController.m in Sources */,
826F86741BF8123D000F9216 /* TLYShyNavBarManager.m in Sources */,
826F86731BF8123D000F9216 /* TLYShyViewController.m in Sources */,
826F86721BF8123D000F9216 /* TLYShyStatusBarController.m in Sources */,
E7ADE6421A99AB5800E8F95C /* TableViewController.swift in Sources */,
E7ADE6501A9A6F7C00E8F95C /* UIViewController+BetterLayoutGuides.m in Sources */,
826F86711BF8123D000F9216 /* TLYShyScrollViewController.m in Sources */,
826F86701BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m in Sources */,
E7ADE6101A99A83B00E8F95C /* AppDelegate.swift in Sources */,
E7ADE6511A9A6F7C00E8F95C /* TLYDelegateProxy.m in Sources */,
E7ADE6521A9A6F7C00E8F95C /* TLYShyNavBarManager.m in Sources */,
E7ADE64F1A9A6F7C00E8F95C /* NSObject+TLYSwizzlingHelpers.m in Sources */,
826F866D1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m in Sources */,
826F866E1BF8123D000F9216 /* TLYDelegateProxy.m in Sources */,
826F866F1BF8123D000F9216 /* UIScrollView+Helpers.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -324,6 +357,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@ -387,6 +421,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TLYShyNavBarSwiftDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
};
@ -398,6 +433,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TLYShyNavBarSwiftDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h";
};
@ -417,6 +453,7 @@
);
INFOPLIST_FILE = TLYShyNavBarSwiftDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TLYShyNavBarSwiftDemo.app/TLYShyNavBarSwiftDemo";
};
@ -432,6 +469,7 @@
);
INFOPLIST_FILE = TLYShyNavBarSwiftDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.telly.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TLYShyNavBarSwiftDemo.app/TLYShyNavBarSwiftDemo";
};

View File

@ -3,7 +3,7 @@
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Acktie, LLC. All rights reserved.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit
@ -15,9 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
}

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
@ -11,12 +12,6 @@
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Acktie, LLC. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TLYShyNavBarSwiftDemo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
@ -28,9 +23,6 @@
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>

View File

@ -1,56 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="gcu-PF-Kdc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="gcu-PF-Kdc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--Demo-->
<scene sceneID="5MV-8R-1mp">
<objects>
<tableViewController id="u4f-jm-pLt" customClass="TableViewController" customModule="TLYShyNavBarSwiftDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="yOB-Ib-nJT">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="rc9-p0-nKD">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rc9-p0-nKD" id="N7f-GN-2zs">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Scroll" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lY6-Vg-XZm">
<rect key="frame" x="0.0" y="-21" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<variation key="widthClass=compact" fixedFrame="YES">
<rect key="frame" x="8" y="8" width="44" height="21"/>
</variation>
</label>
</subviews>
<variation key="default">
<mask key="subviews">
<exclude reference="lY6-Vg-XZm"/>
</mask>
</variation>
<variation key="widthClass=compact">
<mask key="subviews">
<include reference="lY6-Vg-XZm"/>
</mask>
</variation>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="u4f-jm-pLt" id="0XH-xm-LBh"/>
<outlet property="delegate" destination="u4f-jm-pLt" id="B1g-9M-ck7"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Demo" id="mru-Ba-r9e"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sOT-UF-3QF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1765.5" y="967"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="VSn-a0-VnN">
<objects>
@ -62,12 +17,60 @@
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="u4f-jm-pLt" kind="relationship" relationship="rootViewController" id="ELf-J7-Ybx"/>
<segue destination="vOs-5m-xlO" kind="relationship" relationship="rootViewController" id="p9Y-9o-9MW"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Frk-A2-IjM" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="847.5" y="967"/>
</scene>
<!--Table View Controller-->
<scene sceneID="NAs-uQ-Ea8">
<objects>
<viewController id="vOs-5m-xlO" customClass="TableViewController" customModule="TLYShyNavBarSwiftDemo" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="C6a-f8-KBT"/>
<viewControllerLayoutGuide type="bottom" id="FKh-fg-vBU"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="uTv-Xr-a2q">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fV9-Px-sY4">
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" id="Ag6-XG-aGT">
<rect key="frame" x="0.0" y="92" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ag6-XG-aGT" id="Cc3-Ve-97U">
<rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="vOs-5m-xlO" id="fhv-O6-Mqa"/>
<outlet property="delegate" destination="vOs-5m-xlO" id="mQU-nr-T9M"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="fV9-Px-sY4" firstAttribute="leading" secondItem="uTv-Xr-a2q" secondAttribute="leadingMargin" constant="-20" id="Et1-aO-iuq"/>
<constraint firstItem="fV9-Px-sY4" firstAttribute="top" secondItem="C6a-f8-KBT" secondAttribute="bottom" id="H65-cb-z1U"/>
<constraint firstAttribute="trailingMargin" secondItem="fV9-Px-sY4" secondAttribute="trailing" constant="-20" id="QXg-lr-akD"/>
<constraint firstItem="FKh-fg-vBU" firstAttribute="top" secondItem="fV9-Px-sY4" secondAttribute="bottom" id="ayS-2m-MHv"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="2Z9-8I-sLg"/>
<connections>
<outlet property="tableView" destination="fV9-Px-sY4" id="SgW-ha-8aS"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="eHc-LN-fao" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1689" y="967"/>
</scene>
</scenes>
</document>

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.acktie.test.swift.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -3,49 +3,39 @@
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Acktie, LLC. All rights reserved.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit
class TableViewController: UITableViewController {
class TableViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
/* In your UIViewController viewDidLoad or after creating the scroll view. */
self.shyNavBarManager.scrollView = self.tableView;
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
let view = UIView(frame: CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 40))
view.backgroundColor = UIColor.redColor()
/* Library code */
self.shyNavBarManager.scrollView = self.tableView;
self.shyNavBarManager.extensionView = view
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: - Table view data source
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// #warning Potentially incomplete method implementation.
// Return the number of sections.
return 1
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete method implementation.
// Return the number of rows in the section.
extension TableViewController: UITableViewDataSource {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 50
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
cell.textLabel?.text = "Content"
return cell
}
}

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.acktie.test.swift.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -3,7 +3,7 @@
// TLYShyNavBarSwiftDemoTests
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Acktie, LLC. All rights reserved.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit

22
TODO.md
View File

@ -1,19 +1,9 @@
# TODO
+ ~~**REALLY need to import the `realTopLayoutGuide` categories**~~
+ ~~**REALLY need to cleanup scrollView observer properly**~~
+ ~~Add ability to remove extension view~~
+ ~~Add tolerance customization~~
+ ~~Add more convenience methods for the `UIViewController` category~~
+ ~~CocoaPods support~~
+ ~~Update GIF to focus on the navbar, and demo the scroll ended animation feature~~
+ ~~Rename TLYShyNavBarController files to Manager~~
+ ~~Solve the scrollView did end dragging problem~~
+ ~~Fix orientation problems~~
+ ~~Don't end scrolling while the scrollView is decelerating. (isTracking property in gesture recognizer?)~~
+ ~~Write proper readme file~~
## Good to Have
+ Support contracting toolbar
+ Explore setting ViewController.view as a child, somehow
+ UITableView demo
+ Hidden status bar demo
+ expanded status bar demo
+ Fix contentInset calculation once and for all
+ Figure out a workaround to NSProxy

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
resources/basic-feature.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
resources/fade-navbar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
resources/in-app-call.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
resources/no-extension.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
resources/robust.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

BIN
resources/sticky-navbar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

BIN
resources/tableview.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB