Compare commits

...

149 Commits

Author SHA1 Message Date
Alexey Savin bba3fcecc4 Contacted, expanded properties exposed 2016-04-19 14:13:57 +03:00
Alexey Savin 31dbd543ad Added expand completion 2016-03-16 20:17:20 +03:00
Alexey Savin b7beb2f8c8 Hidden status bar height fix 2016-03-16 20:01:16 +03:00
Alexey Savin e2bce07b36 Minor fix 2016-03-16 19:55:49 +03:00
Alexey Savin a24bd2f297 Minor fix 2016-03-16 19:50:10 +03:00
Alexey Savin 1bf3376157 Status bar additional handling 2016-03-16 19:39:45 +03:00
Alexey Savin 3ef37fc24f Minor fix 2016-03-16 17:05:23 +03:00
Alexey Savin 3ad2556f55 Expand method
Delegate fix
2016-03-16 16:54:20 +03:00
Maz Jaleel 537bce6c30 Merge pull request #122 from szweier/fix-refresh
Fix refresh
2016-02-29 23:07:44 +09:00
Maz Jaleel 6cd994afa7 Merge pull request #123 from szweier/fix-navigation-controller-is-jumping-unexpectedly
Fix constraints to make demo work correctly
2016-02-24 09:05:24 +09:00
Steven Zweier a117fc058f fix default values 2016-02-23 11:31:32 -05:00
Steven Zweier 39302de4ba Fix constraints to make demo work correctly 2016-02-23 11:21:56 -05:00
Steven Zweier 48b0eafe5f add line break 2016-02-23 09:52:50 -05:00
Steven Zweier 3a138c4207 add line break 2016-02-23 09:51:32 -05:00
Steven Zweier 58a2d1b31c adjust alignment 2016-02-23 09:50:29 -05:00
Steven Zweier c41c5bd3ad fix refresh issue 2016-02-23 09:49:40 -05:00
Maz Jaleel d16780e8a5 Merge pull request #121 from szweier/set-specific-viewcontroller-on-manager
Allow specific view controller to be set if needed
2016-02-23 22:41:31 +09:00
Steven Zweier 15bd513774 Fix refresh control 2016-02-22 16:33:09 -05:00
Steven Zweier 192075bf3d Allow specific view controller to be set if needed 2016-02-22 14:02:29 -05:00
Maz Jaleel b0eacc80bf Merge pull request #118 from gfzabarino/feature/queryForAssociationToViewController
Added method to query if a TLYShyNavBarManager instance is associated with a UIViewController without triggering its creation
2016-01-30 22:43:10 +09:00
Maz Jaleel a1c57da65f Merge pull request #117 from gfzabarino/master
Scroll view started with wrong content offset on some occasions
2016-01-30 20:14:56 +09:00
Gian Franco Zabarino 47f9b081bf - Added method to query for the existence of an associated TLYShyNavBarManager instance without triggering its creation and association. 2016-01-29 23:17:28 -03:00
Maz Jaleel fb95964272 Merge pull request #114 from bbreier/master
Fix issue #113
2016-01-30 10:22:07 +09:00
Gian Franco Zabarino b8b32c597f Merge branch 'upstreamMaster' 2016-01-29 22:04:59 -03:00
Gian Franco Zabarino e1fba0efa7 - Fixed bug in which the bounds / contentOffset of the scroll view wasn't being updated on some occasions. 2016-01-29 22:04:14 -03:00
Benjamin Breier 2bca45f16d Fix bug that could alter frame of UICollectionViews on first hiding of nav bar 2016-01-15 17:21:14 -08:00
Maz Jaleel fa4b25e4bf Merge pull request #106 from gfzabarino/master
Added delegate to TLYShyNavBarManager
2015-12-20 23:01:05 -08:00
Gian Franco Zabarino fc2108e238 Changed typeof statement to __typeof. 2015-12-21 01:28:59 -03:00
Gian Franco Zabarino 71f03b9195 Added delegate to latest code in the original repository. 2015-12-11 18:13:43 -03:00
Gian Franco Zabarino 53cf176916 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	TLYShyNavBar/TLYShyNavBarManager.h
#	TLYShyNavBar/TLYShyNavBarManager.m
2015-12-11 18:08:05 -03:00
Maz Jaleel 7e52e3a427 Update README.md
better shield link
2015-11-22 23:07:41 -08:00
Maz Jaleel a4d91870aa Update README.md 2015-11-19 02:20:42 -08:00
Maz Jaleel 07ac754965 Update README.md 2015-11-19 02:17:54 -08:00
Maz Jaleel 70a1ff03c6 Merge pull request #98 from bradleyayers/master
Add support for carthage
2015-11-19 02:17:00 -08:00
Bradley Ayers 8f40de0fc0 Update README to include Carthage instructions 2015-11-19 21:10:52 +11:00
Bradley Ayers 03427bccbe #73 Share the default TLYShyNavBar scheme so it is built by carthage. 2015-11-19 21:02:38 +11:00
Bradley Ayers 4484d0747a Add an xcodeproj for #73. 2015-11-19 20:58:03 +11:00
Maz Jaleel 49f88bcf46 update pod 2015-11-14 19:36:48 -08:00
Maz Jaleel 57a2be058b Merge pull request #97 from telly/develop
v1.0
2015-11-14 19:35:37 -08:00
Maz Jaleel da990c1b7f v1.0 prova 2015-11-14 19:17:04 -08:00
Maz Jaleel e7dcca4d20 enhance demo a bit 2015-11-14 19:15:27 -08:00
Maz Jaleel 679d5caef1 Minor fixes for different setups 2015-11-14 19:14:56 -08:00
Maz Jaleel ab74d0360c import and code cleanup 2015-11-14 18:37:50 -08:00
Maz Jaleel 879898fbb4 cleanup swift demo 2015-11-14 18:35:46 -08:00
Maz Jaleel 87cbb39008 That covers all the features! 2015-11-14 16:33:05 -08:00
Maz Jaleel b676a02026 Semi-working opaque bars, table view header 2015-11-13 23:52:59 -08:00
Maz Jaleel 06195c9c16 Cleanups for v1.0.0!
Simplify code and reorganize project
2015-11-13 19:52:42 -08:00
Maz Jaleel 630032648b Added TableView in demo. Time to fix it! 2015-11-13 18:23:38 -08:00
Maz Jaleel 97ef8b6276 Fixed demo on larger iPhone sizes
Fixed all constraints issues
2015-11-13 18:01:42 -08:00
Maz Jaleel 61f48e5ef1 Merge pull request #94 from DagAgren/master
FIx include paths in TLYShyNavBarManager
2015-10-28 08:59:37 -07:00
DagAgren 96725b437e FIx include paths in TLYShyNavBarManager 2015-10-28 11:48:26 +02:00
Maz Jaleel 29d42955e7 Because @jimmar thinks himself a spelling cop 2015-10-22 23:02:08 -07:00
Mazyad Alabduljaleel 5aa9c03687 update docs 2015-10-20 20:46:14 -07:00
Mazyad Alabduljaleel 77b754cc3e release v0.10.1 2015-10-20 20:08:04 -07:00
Mazyad Alabduljaleel baffc6fe0d fixes #93 .. As far as I can tell 2015-10-20 19:54:29 -07:00
Mazyad Alabduljaleel ff67d2b0a0 Added collectionView demo
Has the problem described in #93
2015-10-20 19:41:36 -07:00
Maz Jaleel fb81a41a57 Create CHANGELOG.md 2015-10-10 18:49:11 -07:00
Mazyad Alabduljaleel 4c6aefe0ea 0.10.0 2015-10-10 18:38:16 -07:00
Maz Jaleel 857236c373 Update README.md 2015-10-10 18:31:49 -07:00
Maz Jaleel 19db5a8679 Update README.md 2015-10-10 15:09:56 -07:00
Mazyad Alabduljaleel 929f03327c update readme with better instructions 2015-10-10 15:08:52 -07:00
Mazyad Alabduljaleel 008a4dbea3 add a button to the extension view for testing 2015-10-10 14:30:59 -07:00
Maz Jaleel 164eedaad4 Merge pull request #89 from telly/modular-parent
Modular offset calculation
2015-10-10 14:19:00 -07:00
Mazyad Alabduljaleel a6c73f8239 more accurate readme 2015-10-10 14:18:08 -07:00
Mazyad Alabduljaleel 93402b62af Modular offset calculation
added sticky navigation feature
added more tests

BRIEF:
Completely overhauled the offset implementation. Now, a "shyView" calculates it's position based on its parent maxY property. For the navigation bar, that would be the status bar. For the extension view, it would be the navigation bar.
2015-10-10 14:04:59 -07:00
Mazyad Alabduljaleel 0617cd18d4 cocoapods update v0.9.15 2015-10-08 14:25:44 -07:00
Mazyad Alabduljaleel 67d2b167e5 Update README 2015-10-08 14:22:31 -07:00
Mazyad Alabduljaleel 8e379e9737 Update README 2015-10-08 14:21:45 -07:00
Mazyad Alabduljaleel 4daab18bd0 Update README 2015-10-08 14:17:58 -07:00
Mazyad Alabduljaleel 33ad649542 update README 2015-10-08 14:07:45 -07:00
Mazyad Alabduljaleel 5d205371be Refactoring and cleanup
[NEW]: Add Navbar fading to the demo
[FIX]: Consolidate fading behavior into an enum. Deprecated the old booleans
[FIX]: Cleanup unused code
[FIX]: Xcode 7 warnings in the demo
2015-10-08 13:44:07 -07:00
Mazyad Alabduljaleel e105a37f5b Added Test
[NEW]: Added a tableView to the demo in order to test different features
2015-10-08 13:39:06 -07:00
Mazyad Alabduljaleel 32534a7ef2 Bug fix when scrolling fast with an extension view
[FIX]: scrollView would go under the extension view if scrolling too fast after going beyond the topContentInset
2015-10-08 13:29:56 -07:00
Maz Jaleel 4f6ec675d4 Merge pull request #86 from longsview/master
Added ability to alphaFade entire navbar and transfer userInteractionEnabled state to extension view container
2015-10-08 12:11:15 -07:00
Nicholas Long e5ef717aaf Added ability to alphaFade entire navbar instead of just it's subviews. Transfered userInteractionEnabled state from extensionView to extensionViewContainer. 2015-10-08 11:51:19 -07:00
Maz Jaleel a05054d7df Merge pull request #83 from aasatt/master
Fix setStickyExtensionView
2015-08-17 03:01:34 +04:00
Maz Jaleel f02f0ad8a4 Merge pull request #82 from evands/fix-scroll-to-top
Fix scrollToTop (by tapping on the status bar)
2015-08-17 02:58:25 +04:00
Maz Jaleel fed648bcc3 Merge pull request #81 from evands/fix-shynav-in-popover_isolated
Fix shy nav bar positioning when shown in a popover or modal dialog
2015-08-17 02:58:10 +04:00
Maz Jaleel 1f2517ed86 Merge pull request #80 from evands/fix-hiding-extension-view
Fix nav bar position after hiding the extension view
2015-08-17 02:57:57 +04:00
Evan D. Schoenberg, M.D 33c65bd321 Fix positioning of the navigation bar when the status bar is larger than 20 pixels 2015-08-16 18:45:01 -04:00
Evan D. Schoenberg, M.D 5f6e0a07f4 Fix determining the size of the status bar when it is more than 20 pixels, which happens for example if a call or GPS are active. 2015-08-16 18:44:20 -04:00
Aaron Satterfield 8f59d70843 setStickyExtensionView Works Now
Now this function actually has an effect instead of always being YES
2015-08-13 16:35:42 -07:00
Evan D. Schoenberg, M.D de6c006a76 If the status bar is tapped to scroll to the top, the system doesn't understand the presence of the hidden nav bar or optional extension view. Therefore, once scrolling is deemed complete, we need to scroll up a bit further. I played extensively with doing this all in one go, for example by overriding the behavior in scrollViewShouldScrollToTop, but couldn't make it work smoothly. This implementation does have a small stutter as the larger first animation transitions into the second smaller animation occurs, but it is much better than before. 2015-08-11 00:24:15 -04:00
Evan D. Schoenberg, M.D ade5b370bd When avoiding the status bar, check the view's position relative to the status bar rather than assuming that the presence of a presentingViewController is sufficient; otherwise we would not avoid the status bar in full screen modal views. 2015-08-09 18:48:43 -04:00
Evan D. Schoenberg, M.D 4f651d2547 Added a comment to explain the need to disable scroll handling 2015-08-09 18:41:14 -04:00
Evan D. Schoenberg, M.D e32543c31b If the viewController is within a popover or other modal view, it should not be placed a status bar height below the top of that view. This fixes the use of shyNavBars in those settings. 2015-08-08 18:26:09 -04:00
Evan D. Schoenberg, M.D a01f96db81 When changing the extension view to nil from it previously being set, appropriate changes are made once... but _handleScrolling is then called, leading to incorrect content offsets until the view is scrolled back to the top. Disabling scroll handling temporarily while laying out the views fixes the problem. 2015-08-08 18:13:07 -04:00
Mazyad Alabduljaleel 3f5707ebc5 v0.9.12 cocoapods release 2015-08-08 01:41:15 +04:00
Maz Jaleel 23c027a421 Merge pull request #78 from griddle/master
expand if contentSize of scrollView changes and is not sufficiently long
2015-08-08 01:37:58 +04:00
Garret Riddle d31003bc33 for PR 78: make scrollView a strong property of TLYShyNavBarManager + minor refactoring
see discussion: (https://github.com/telly/TLYShyNavBar/pull/78)
2015-08-07 11:22:15 -10:00
Garret Riddle e07bd4abec expand if contentSize of scrollView changes and is not sufficiently long
issue: https://github.com/telly/TLYShyNavBar/issues/53
2015-08-07 07:08:59 -10:00
Mazyad Alabduljaleel a46ceec2d1 One more of these thingies 2015-07-06 02:00:13 +03:00
Mazyad Alabduljaleel bb6e3b4c8a Cocoapod badge 2015-07-06 01:56:59 +03:00
Mazyad Alabduljaleel 20e38c6d47 Cocoapods release 2015-06-18 16:29:47 +03:00
Mazyad Alabduljaleel 602596d8da Merge pull request #69 from modastic/master
Add ability to stick extension view to the top.
2015-06-18 16:26:01 +03:00
modastic 24781cbc79 Update read me description for ability to stick extension view to the top. 2015-06-11 13:33:42 -04:00
Yukan dd33163301 Add ability to stick extension view to the top. 2015-06-11 13:28:33 -04:00
Gian Franco Zabarino 983f632b76 Added delegate method to notify the client when the navigation bar became fully contracted. 2015-05-05 16:59:57 -03:00
Gian Franco Zabarino 2e065ac823 Added delegate to have the client notified when a contraction or expansion finishes animating. 2015-05-05 16:41:04 -03:00
Gian Franco Zabarino d975745250 Added scrollIndicatorInsets adjust when scrolling. 2015-05-04 20:43:44 -03:00
Mazyad Alabduljaleel 0afb58fcdb cocoapods bump 2015-04-04 05:19:25 +04:00
Mazyad Alabduljaleel 8b52fd688b small styling nitpicks 2015-04-04 05:18:13 +04:00
Mazyad Alabduljaleel 308869ccf5 Merge pull request #62 from Remki/incall-statusbar-error
Fixed error caused by in-call status bar height.
2015-04-04 05:15:43 +04:00
Remigiusz Herba eea618b6bb Fixed error caused by inCall status bar height. 2015-03-26 09:16:21 +01:00
Mazyad Alabduljaleel f0fa6b4a31 Update README.md
added reference to BLKFlexibleHeightBar
2015-03-13 15:07:04 +04:00
Mazyad Alabduljaleel 1e73c335d6 Seems like cocoapods doesn't like gifs :( 2015-03-13 14:32:10 +04:00
Mazyad Alabduljaleel fb0812fb04 bump cocoapods version. Fixes #57 2015-03-13 14:09:28 +04:00
Mazyad Alabduljaleel fd57fbe676 Merge pull request #55 from skela/master
residual check comparing with FLT_EPSILON instead of 0 to avoid flickeri...
2015-03-11 23:45:36 +04:00
Alek Slater 1bdd270618 residual check comparing with FLT_EPSILON instead of 0 to avoid flickering 2015-03-11 12:04:20 +08:00
Mazyad Alabduljaleel d8c9d81b65 Merge pull request #52 from TNuzzi/master
Adding Swift support to documentation
2015-02-23 11:31:24 +04:00
Tony Nuzzi a3cbd2ae58 Updating docs to remove the need to update .h with import 2015-02-22 14:23:06 -06:00
Tony Nuzzi 634226702b Removing locally copyied TLYShyNavBar and replacing with reference copy 2015-02-22 14:18:17 -06:00
Tony Nuzzi ccd5229c78 Adding import to base classes for Swift support 2015-02-22 14:16:24 -06:00
Tony Nuzzi b2c040fb1e Adding Swift code example 2015-02-22 00:23:09 -06:00
Tony Nuzzi c4fbbb674c Fixing minor typos and image sizes 2015-02-21 23:52:50 -06:00
Tony Nuzzi 71d21d9508 Updating documenation for Swift support 2015-02-21 23:48:01 -06:00
Mazyad Alabduljaleel 258d298cf9 Merge pull request #45 from blackm00n/save_visual_offset
Modify contentInset and scrollIndicatorInsets while preserving visual co...
2015-01-06 23:56:36 +04:00
Mazyad Alabduljaleel 6db17e0706 Merge pull request #44 from blackm00n/disabled_flag
introduce disabled flag
2015-01-06 23:55:47 +04:00
Aleksey Kozhevnikov 32225901be introduce disabled flag 2015-01-06 22:11:05 +03:00
Aleksey Kozhevnikov 3dd5bfc7a5 Modify contentInset and scrollIndicatorInsets while preserving visual content offset in layoutViews method 2014-12-24 00:43:45 +03:00
Mazyad Alabduljaleel b1bee69762 Merge pull request #38 from anovoselskyi/master
fixed issue with hiding navBar
2014-11-06 16:17:54 +04:00
Andrii Novoselskyi 85c696fcd9 fixed issue with hiding navBar
fixed issue with hiding navBar when scroll/table view in bottom position
2014-10-29 16:04:08 +02:00
Mazyad Alabduljaleel 735c8181fa [NEW]: updated to version 0.9.8 2014-10-16 12:31:08 +04:00
Mazyad Alabduljaleel 022ccc81db Merge pull request #37 from iSevenDays/patch-1
fix for container view
2014-10-16 12:18:58 +04:00
Anton Sokolchenko 770320f2bd fix for container view
When you have n view controllers and one container view and you want switch between them, but keep one shyNavBar, you can change only scrollview of displayed view controller.
2014-10-13 16:02:12 +03:00
Mazyad Alabduljaleel 449cf29e3f [FIX]: just some general code style fixes 2014-09-16 12:58:37 +04:00
Mazyad Alabduljaleel fc12da7327 Merge branch 'master' of github.com:telly/TLYShyNavBar 2014-09-16 12:52:06 +04:00
Mazyad Alabduljaleel e6cb38db4a Merge pull request #25 from koenbud/Issue-24_prepareForDisplay-never-called
Fix isViewControllerVisible property
2014-09-16 12:51:32 +04:00
Mazyad Alabduljaleel f46e4fd79d Merge branch 'master' of github.com:telly/TLYShyNavBar 2014-09-16 12:49:52 +04:00
Mazyad Alabduljaleel 1bca61f0f6 Merge pull request #32 from richarddas/master
fix #31 Added public property for enabling/disabling alpha fade
2014-09-16 12:49:05 +04:00
Mazyad Alabduljaleel 6b3c3934b1 Merge branch 'master' of github.com:telly/TLYShyNavBar 2014-09-16 12:42:17 +04:00
Richard Das b60827cc12 fix #31 Added public property for enabling/disabling alpha fade 2014-09-08 13:49:41 +01:00
Richard Das 1f182205a4 Only return statusBar height if statusBar is not hidden, else return 0. 2014-09-07 00:57:48 +01:00
Koen Buddelmeijer 37279e3c30 Fix isViewControllerVisible property 2014-08-19 09:00:01 +02:00
Mazyad Alabduljaleel 00faaa397d Update README.md 2014-08-06 01:27:17 +04:00
Mazyad Alabduljaleel 2c05607ba2 [FIX]: minor cleanups 2014-08-03 16:34:44 +04:00
Mazyad Alabduljaleel ae515c6e4a [NEW]: updated to version 0.9.7 2014-07-20 13:56:13 +04:00
Mazyad Alabduljaleel 0fd9e806dc Merge branch 'master' of github.com:telly/TLYShyNavBar 2014-07-20 13:54:31 +04:00
Mazyad Alabduljaleel a51432d7c8 Merge pull request #15 from sonxurxo/master
Fixes an issue when going active from the background
2014-07-20 13:51:13 +04:00
Xurxo Méndez Pérez ed34a8dc90 Using UIApplicationDidBecomeActiveNotification key 2014-07-16 12:35:59 +02:00
Xurxo Méndez Pérez 4db193e0d2 Updated README.md 2014-07-16 10:45:03 +02:00
Xurxo Méndez Pérez ad96ff94f8 Added applicationDidBecomeActive behavior 2014-07-16 10:30:01 +02:00
Mazyad Alabduljaleel 6dda4a2095 [FIX]: updated doc 2014-07-15 14:46:46 +04:00
Mazyad Alabduljaleel 47eb89a1b2 Merge pull request #13 from telly/small-content-size-fix
fixes #12
2014-07-15 14:40:56 +04:00
Mazyad Alabduljaleel d97164f728 [FIX]: don't handle the scrolling if the content size of the scroll view is insufficiently long. #12 2014-07-15 14:18:17 +04:00
Mazyad Alabduljaleel 45f9297f28 [NEW]: upgrade pods 0.9.6 2014-07-13 14:56:28 +04:00
Mazyad Alabduljaleel 4b5b6c76eb [FIX]: missing setting the _extensionView variable. fixes #10 2014-07-13 14:54:37 +04:00
Mazyad Alabduljaleel ca2624786e [NEW]: updated cocopods. Should help #10 2014-07-11 17:27:06 +04:00
Mazyad Alabduljaleel 796f5f5e1e [NEW]: expose the extension view. We may need it 2014-07-08 16:37:20 +04:00
70 changed files with 3520 additions and 390 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.

134
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)
@ -12,60 +18,79 @@ This component helps you mimick the navigation bar auto scrolling that you see i
+ **[Features](#features)**: See what this component has to offer!
+ **[Quick Start](#quick-start)**: TL;DR people, you'll love this.
+ **[Design Goals](#design-goals)**: The cherished aspects of this component.
+ **[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
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:
```objc
#import "TLYShyNavBarManager.h"
```
Then, you should be able to follow the Objective-C instructions, since the code is almost identical.
## Design Goals
+ **Ease of Use**: This is the most important, and should never be compromised. Even if compatability breaks or versatility is limited, the component should remain easy to integrate.
+ **Portable**: Less dependencies, lightweight, self-contained, ... etc.
+ **Compatability**: Whenever possible, the component should simply work with whatever you throw at it.
## 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
@ -84,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).
@ -98,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
@ -126,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:
@ -162,8 +207,21 @@ 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)
+ [AMScrollingNavbar](https://github.com/andreamazz/AMScrollingNavbar)
+ [GTScrollNavigationBar](https://github.com/luugiathuy/GTScrollNavigationBar)
+ [JKAutoShrinkView](https://github.com/fsjack/JKAutoShrinkView)

View File

@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#
s.name = "TLYShyNavBar"
s.version = "0.9.4"
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
@ -35,7 +35,7 @@ Pod::Spec.new do |s|
DESC
s.homepage = "https://github.com/telly/TLYShyNavBar"
s.screenshots = "https://raw.githubusercontent.com/telly/TLYShyNavBar/master/resources/battle-tested-demo.gif", "https://raw.githubusercontent.com/telly/TLYShyNavBar/master/resources/ShyNavBar-1.gif"
s.screenshots = "http://imgur.com/dv1LK1v.png"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@ -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.4" }
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;
@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
{
if (!self.isDragging && !self.isDecelerating && 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,23 @@
//
// 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) UIRefreshControl *refreshControl;
@property (nonatomic, weak) TLYShyViewController *parent;
- (CGFloat)updateLayoutIfNeeded;
@end

View File

@ -0,0 +1,58 @@
//
// 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];
}
- (CGFloat)updateLayoutIfNeeded
{
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 = UIEdgeInsetsMake(self.scrollView.contentInset.top, 0, self.scrollView.contentInset.bottom, 0);
insets.top = normalizedY;
if (normalizedY > -FLT_EPSILON && !UIEdgeInsetsEqualToEdgeInsets(insets, self.scrollView.contentInset))
{
CGFloat delta = insets.top - self.scrollView.contentInset.top;
if (self.refreshControl == nil || [self.refreshControl isHidden]) {
[self.scrollView tly_setInsets:insets];
}
return delta;
}
if (normalizedY < -FLT_EPSILON)
{
CGRect frame = self.scrollView.frame;
frame = UIEdgeInsetsInsetRect(frame, insets);
self.scrollView.frame = frame;
return [self updateLayoutIfNeeded];
}
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

@ -7,12 +7,18 @@
//
#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
@ -24,22 +30,34 @@ 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, assign, readonly) BOOL contracted;
@property (nonatomic, assign, readonly) BOOL expanded;
@property (nonatomic) BOOL hidesSubviews;
@property (nonatomic) BOOL hidesAfterContraction;
@property (nonatomic) TLYShyNavBarFade fadeBehavior;
/* Sticky means it will always stay in expanded state
*/
@property (nonatomic) BOOL sticky;
@property (nonatomic) BOOL handleStatusBar;
- (void)offsetCenterBy:(CGPoint)deltaPoint;
- (CGFloat)updateYOffset:(CGFloat)deltaY;
- (CGFloat)snap:(BOOL)contract;
- (CGFloat)snap:(BOOL)contract completion:(void (^)())completion;
- (CGFloat)expand;
- (CGFloat)contract;
@end
@interface TLYShyViewController (AsParent) <TLYShyParent>
@end

View File

@ -0,0 +1,260 @@
//
// 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
static CGFloat const kTLYShyViewControllerStatusBarHeight = 20.0f;
@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
{
CGFloat height = CGRectGetHeight(self.view.bounds);
if (self.handleStatusBar && [UIApplication sharedApplication].isStatusBarHidden) {
height -= kTLYShyViewControllerStatusBarHeight;
}
return self.sticky ? 0.f : height;
}
- (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
{
return [self snap:contract completion:nil];
}
- (CGFloat)snap:(BOOL)contract completion:(void (^)())completion
{
/* "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];
}
}
completion:^(BOOL finished)
{
if (completion && finished) {
completion();
}
}];
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

@ -7,8 +7,12 @@
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TLYShyNavBarFade.h"
/* CLASS DESCRIPTION:
@protocol TLYShyNavBarManagerDelegate;
/** CLASS DESCRIPTION:
* ==================
* Manages the relationship between a scrollView and a view
* controller. Must be instantiated and assigned the scrollView
@ -18,11 +22,7 @@
*
* viewController.shyNavManager = ...;
*
* OR
*
* [viewController addShyNavManagerWithScrollView:scrollView]
*/
@interface TLYShyNavBarManager : NSObject
/* The view controller that is part of the navigation stack
@ -33,25 +33,73 @@
/* 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
*/
@property (nonatomic, strong) UIView *extensionView;
/* The container contains the extension view, if any. Exposed to
* allow the developer to adjust content offset as necessary.
*/
@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
- (void)setExtensionView:(UIView *)view;
/* Choose how the navbar fades as it contracts/expands.
* Defaults to FadeSubviews
*/
@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.
*/
@property (nonatomic, weak) id<TLYShyNavBarManagerDelegate> delegate;
@property (nonatomic) BOOL handleStatusBar;
@property (nonatomic) BOOL contracted;
@property (nonatomic) BOOL expanded;
- (void)expandWithCompletion:(void (^)())completion;
@end
/* PROTOCOL DESCRIPTION:
* =====================
* This protocol is used to notify an optional TLYShyNavBarManager's delegate
* when a contraction or expansion finishes animating.
*/
@protocol TLYShyNavBarManagerDelegate <NSObject>
@optional
- (void)shyNavBarManagerDidBecomeFullyContracted:(TLYShyNavBarManager *) shyNavBarManager;
- (void)shyNavBarManagerDidFinishContracting:(TLYShyNavBarManager *) shyNavBarManager;
- (void)shyNavBarManagerDidFinishExpanding:(TLYShyNavBarManager *) shyNavBarManager;
@end
/* CATEGORY DESCRIPTION:
/** CATEGORY DESCRIPTION:
* =====================
* The category described in the TLYShyNavBarManager usage, and it
* simply uses associated objects to attatch a TLYShyNavBar to the
@ -67,4 +115,15 @@
/* Initially, this is nil, but created for you when you access it */
@property (nonatomic, strong) TLYShyNavBarManager *shyNavBarManager;
/*
* Set the TLYShyNavBarManager while also specifying a view controller
*/
- (void)setShyNavBarManager:(TLYShyNavBarManager *)shyNavBarManager
viewController:(UIViewController *)viewController;
/* Use this to find out if a TLYShyNavBarManager instance was associated
* to this view controller, without triggering its creation and association.
*/
- (BOOL)isShyNavBarManagerPresent;
@end

View File

@ -7,43 +7,42 @@
//
#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()
{
CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
return MIN(statusBarSize.width, statusBarSize.height);
}
#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, getter = isViewControllerVisible) BOOL viewControllerVisible;
@property (nonatomic) BOOL previousContractionState;
@property (nonatomic, assign) BOOL contracting;
@property (nonatomic, assign) BOOL previousContractionState;
@property (nonatomic, readonly) BOOL isViewControllerVisible;
@end
@ -57,49 +56,49 @@ static inline CGFloat AACStatusBarHeight()
if (self)
{
self.delegateProxy = [[TLYDelegateProxy alloc] initWithMiddleMan:self];
/* Initialize defaults */
self.contracting = NO;
self.previousContractionState = YES;
self.expansionResistance = 200.f;
self.contractionResistance = 0.f;
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
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationDidChangeStatusBarFrame:)
name:UIApplicationDidChangeStatusBarFrameNotification
object:nil];
}
return self;
}
@ -111,6 +110,9 @@ static inline CGFloat AACStatusBarHeight()
{
_scrollView.delegate = _delegateProxy.originalDelegate;
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
[_scrollView removeObserver:self forKeyPath:@"contentSize" context:kTLYShyNavBarManagerKVOContext];
}
#pragma mark - Properties
@ -118,47 +120,148 @@ static inline CGFloat AACStatusBarHeight()
- (void)setViewController:(UIViewController *)viewController
{
_viewController = viewController;
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, @"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.");
viewController.extendedLayoutIncludesOpaqueBars = YES;
[self.extensionViewContainer removeFromSuperview];
[self.viewController.view addSubview:self.extensionViewContainer];
self.navBarController.view = navbar;
[self layoutViews];
}
- (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;
NSUInteger index = [scrollView.subviews indexOfObjectPassingTest:^BOOL (id obj, NSUInteger idx, BOOL *stop) {
return [obj isKindOfClass:[UIRefreshControl class]];
}];
if (index != NSNotFound) {
self.scrollViewController.refreshControl = [scrollView.subviews objectAtIndex:index];
}
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
{
return self.extensionViewContainer.bounds;
}
#pragma mark - Private methods
- (void)_handleScrolling
- (BOOL)isViewControllerVisible
{
if (!self.isViewControllerVisible)
return self.viewController.isViewLoaded && self.viewController.view.window;
}
- (void)setDisable:(BOOL)disable
{
if (disable == _disable)
{
return;
}
_disable = disable;
if (!disable) {
self.previousYOffset = self.scrollView.contentOffset.y;
}
}
- (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;
}
- (BOOL)handleStatusBar
{
return self.navBarController.handleStatusBar;
}
- (void)setHandleStatusBar:(BOOL)handleStatusBar
{
self.navBarController.handleStatusBar = handleStatusBar;
}
- (BOOL)contracted
{
return self.navBarController.contracted;
}
- (BOOL)expanded
{
return self.navBarController.expanded;
}
#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;
}
return (self.isViewControllerVisible && [self _scrollViewIsSuffecientlyLong]);
}
- (void)_handleScrolling
{
if (![self _shouldHandleScrolling])
{
return;
}
if (!isnan(self.previousYOffset))
{
// 1 - Calculate the delta
@ -168,49 +271,71 @@ 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 */
CGFloat end = floorf(self.scrollView.contentSize.height - CGRectGetHeight(self.scrollView.bounds) + self.scrollView.contentInset.bottom - 0.5f);
if (self.previousYOffset > end)
if (self.previousYOffset > end && deltaY > 0)
{
deltaY = MAX(0, deltaY - self.previousYOffset + end);
}
// 3 - Update contracting variable
if (fabs(deltaY) > FLT_EPSILON)
{
self.contracting = deltaY < 0;
}
// 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);
deltaY = MAX(0, deltaY - availableResistance);
}
// 6 - Update the shyViewController
// 6 - Update the navigation bar shyViewController
self.navBarController.fadeBehavior = self.fadeBehavior;
// 7 - Inform the delegate if needed
CGFloat maxNavY = CGRectGetMaxY(self.navBarController.view.frame);
CGFloat maxExtensionY = CGRectGetMaxY(self.extensionViewContainer.frame);
CGFloat visibleTop;
if (self.extensionViewContainer.hidden) {
visibleTop = maxNavY;
} else {
visibleTop = MAX(maxNavY, maxExtensionY);
}
if (visibleTop == self.statusBarController.calculateTotalHeightRecursively) {
if ([self.delegate respondsToSelector:@selector(shyNavBarManagerDidBecomeFullyContracted:)]) {
[self.delegate shyNavBarManagerDidBecomeFullyContracted:self];
}
}
[self.navBarController updateYOffset:deltaY];
}
self.previousYOffset = self.scrollView.contentOffset.y;
}
@ -220,76 +345,104 @@ static inline CGFloat AACStatusBarHeight()
{
return;
}
__weak __typeof(self) weakSelf;
void (^completion)() = ^
{
__typeof(self) strongSelf = self;
if (strongSelf) {
if (strongSelf.contracting) {
if ([strongSelf.delegate respondsToSelector:@selector(shyNavBarManagerDidFinishContracting:)]) {
[strongSelf.delegate shyNavBarManagerDidFinishContracting:strongSelf];
}
} else {
if ([strongSelf.delegate respondsToSelector:@selector(shyNavBarManagerDidFinishExpanding:)]) {
[strongSelf.delegate shyNavBarManagerDidFinishExpanding:strongSelf];
}
}
}
};
self.resistanceConsumed = 0;
CGFloat deltaY = deltaY = [self.navBarController snap:self.isContracting];
CGPoint newContentOffset = self.scrollView.contentOffset;
newContentOffset.y -= deltaY;
[UIView animateWithDuration:0.2
animations:^{
self.scrollView.contentOffset = newContentOffset;
}];
[self.navBarController snap:self.contracting completion:completion];
}
#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
- (void)setExtensionView:(UIView *)view
{
NSAssert([self.extensionViewContainer.subviews count] <= 1,
@"Please don't tamper with this view! Thanks!");
UIView *previousExtensionView = [self.extensionViewContainer.subviews firstObject];
if (view != previousExtensionView)
if (view != _extensionView)
{
[previousExtensionView removeFromSuperview];
[_extensionView removeFromSuperview];
_extensionView = view;
CGRect bounds = view.frame;
bounds.origin = CGPointZero;
view.frame = bounds;
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;
}
}
- (void)prepareForDisplay
{
[self cleanup];
self.viewControllerVisible = YES;
}
- (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]) > 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.contentInset = scrollInsets;
self.scrollView.scrollIndicatorInsets = scrollInsets;
}
- (void)cleanup
{
[self.navBarController expand];
self.viewControllerVisible = NO;
self.previousYOffset = NAN;
self.previousScrollInsets = UIEdgeInsetsZero;
}
- (void)expandWithCompletion:(void (^)())completion
{
[UIView animateWithDuration:0.2 animations:^ {
[self cleanup];
} completion:^(BOOL finished) {
if (completion) {
completion();
}
}];
}
#pragma mark - UIScrollViewDelegate methods
@ -307,11 +460,29 @@ 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];
}
#pragma mark - NSNotificationCenter methods
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
[self.navBarController expand];
}
- (void)applicationDidChangeStatusBarFrame:(NSNotification *)notification
{
[self.navBarController expand];
}
@end
#pragma mark - UIViewController+TLYShyNavBar category
@ -352,12 +523,26 @@ static char shyNavBarManagerKey;
[self tly_swizzledViewWillDisappear:animated];
}
#pragma mark - Public methods
- (BOOL)isShyNavBarManagerPresent
{
return [self _internalShyNavBarManager] != nil;
}
- (void)setShyNavBarManager:(TLYShyNavBarManager *)shyNavBarManager
viewController:(UIViewController *)viewController
{
NSAssert(viewController != nil, @"viewController must not be nil!");
shyNavBarManager.viewController = viewController;
objc_setAssociatedObject(self, &shyNavBarManagerKey, shyNavBarManager, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
#pragma mark - Properties
- (void)setShyNavBarManager:(TLYShyNavBarManager *)shyNavBarManager
{
shyNavBarManager.viewController = self;
objc_setAssociatedObject(self, &shyNavBarManagerKey, shyNavBarManager, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[self setShyNavBarManager:shyNavBarManager viewController:self];
}
- (TLYShyNavBarManager *)shyNavBarManager
@ -368,7 +553,7 @@ static char shyNavBarManagerKey;
shyNavBarManager = [[TLYShyNavBarManager alloc] init];
self.shyNavBarManager = shyNavBarManager;
}
return shyNavBarManager;
}

View File

@ -1,157 +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
// 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;
}
// 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;
}
}
}
- (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);
[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) > 0;
}
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 _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

@ -10,29 +10,29 @@
<string>TLYShyNavBarDemo</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>A10EB39B-4D27-4420-B35D-3615C3072AE6</key>
<string>ssh://github.com/telly/TLYShyNavBar.git</string>
<key>58D55ECABAD5AAEB583BB3898420091CC2A418B2</key>
<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>A10EB39B-4D27-4420-B35D-3615C3072AE6</key>
<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>110</integer>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>A10EB39B-4D27-4420-B35D-3615C3072AE6</string>
<string>58D55ECABAD5AAEB583BB3898420091CC2A418B2</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>A10EB39B-4D27-4420-B35D-3615C3072AE6</string>
<string>58D55ECABAD5AAEB583BB3898420091CC2A418B2</string>
<key>IDESourceControlWCCName</key>
<string>TLYShyNavBar</string>
</dict>

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="9532" systemVersion="15B42" 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="9530"/>
<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,618 @@
</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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<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" 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="64" width="320" height="504"/>
<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"/>
<constraints>
<constraint firstItem="zXM-Us-jtQ" firstAttribute="leading" secondItem="MSO-HM-o3C" secondAttribute="leading" id="YGz-6i-F6M"/>
<constraint firstAttribute="right" secondItem="zXM-Us-jtQ" secondAttribute="right" id="g44-Ka-P9F"/>
<constraint firstItem="sgb-uZ-rF7" firstAttribute="top" secondItem="zXM-Us-jtQ" secondAttribute="bottom" id="hhN-uq-WOi"/>
<constraint firstItem="zXM-Us-jtQ" firstAttribute="top" secondItem="XjM-9z-Uam" secondAttribute="bottom" id="t3N-xs-ko0"/>
</constraints>
</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" 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="64" width="335" height="504"/>
<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="335" 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="335" 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"/>
<constraints>
<constraint firstItem="Nlh-YW-jQ7" firstAttribute="left" secondItem="Trg-X5-aIb" secondAttribute="left" id="1rE-jk-8qx"/>
<constraint firstItem="PvV-4v-hBz" firstAttribute="top" secondItem="Nlh-YW-jQ7" secondAttribute="bottom" id="H5W-2J-f2D"/>
<constraint firstAttribute="right" secondItem="Nlh-YW-jQ7" secondAttribute="rightMargin" id="K6c-aA-di4"/>
<constraint firstItem="Nlh-YW-jQ7" firstAttribute="top" secondItem="2aT-xe-cs2" secondAttribute="bottom" id="oJF-s6-iWb"/>
</constraints>
</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

@ -14,6 +14,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {

View File

@ -8,6 +8,10 @@
"idiom" : "universal",
"scale" : "2x",
"filename" : "sample@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {

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

@ -0,0 +1,14 @@
//
// Bridging-Header.h
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
#ifndef TLYShyNavBarSwiftDemo_Bridging_Header_h
#define TLYShyNavBarSwiftDemo_Bridging_Header_h
#import "TLYShyNavBarManager.h"
#endif

View File

@ -0,0 +1,511 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
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 */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
E7ADE6201A99A83B00E8F95C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = E7ADE6021A99A83B00E8F95C /* Project object */;
proxyType = 1;
remoteGlobalIDString = E7ADE6091A99A83B00E8F95C;
remoteInfo = TLYShyNavBarSwiftDemo;
};
/* 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>"; };
E7ADE6141A99A83B00E8F95C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
E7ADE6161A99A83B00E8F95C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
E7ADE6191A99A83B00E8F95C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
E7ADE61F1A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TLYShyNavBarSwiftDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E7ADE6241A99A83B00E8F95C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
E7ADE6071A99A83B00E8F95C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
E7ADE61C1A99A83B00E8F95C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* 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 */,
826F86571BF8123D000F9216 /* TLYShyNavBar */,
E7ADE60C1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */,
E7ADE6221A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests */,
E7ADE60B1A99A83B00E8F95C /* Products */,
);
sourceTree = "<group>";
};
E7ADE60B1A99A83B00E8F95C /* Products */ = {
isa = PBXGroup;
children = (
E7ADE60A1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo.app */,
E7ADE61F1A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
E7ADE60C1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */ = {
isa = PBXGroup;
children = (
E7ADE60F1A99A83B00E8F95C /* AppDelegate.swift */,
E7ADE6131A99A83B00E8F95C /* Main.storyboard */,
E7ADE6411A99AB5800E8F95C /* TableViewController.swift */,
E7ADE6161A99A83B00E8F95C /* Images.xcassets */,
E7ADE6181A99A83B00E8F95C /* LaunchScreen.xib */,
E7ADE60D1A99A83B00E8F95C /* Supporting Files */,
);
path = TLYShyNavBarSwiftDemo;
sourceTree = "<group>";
};
E7ADE60D1A99A83B00E8F95C /* Supporting Files */ = {
isa = PBXGroup;
children = (
E7ADE60E1A99A83B00E8F95C /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
E7ADE6221A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests */ = {
isa = PBXGroup;
children = (
E7ADE6251A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.swift */,
E7ADE6231A99A83B00E8F95C /* Supporting Files */,
);
path = TLYShyNavBarSwiftDemoTests;
sourceTree = "<group>";
};
E7ADE6231A99A83B00E8F95C /* Supporting Files */ = {
isa = PBXGroup;
children = (
E7ADE6241A99A83B00E8F95C /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
E7ADE6091A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = E7ADE6291A99A83B00E8F95C /* Build configuration list for PBXNativeTarget "TLYShyNavBarSwiftDemo" */;
buildPhases = (
E7ADE6061A99A83B00E8F95C /* Sources */,
E7ADE6071A99A83B00E8F95C /* Frameworks */,
E7ADE6081A99A83B00E8F95C /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TLYShyNavBarSwiftDemo;
productName = TLYShyNavBarSwiftDemo;
productReference = E7ADE60A1A99A83B00E8F95C /* TLYShyNavBarSwiftDemo.app */;
productType = "com.apple.product-type.application";
};
E7ADE61E1A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = E7ADE62C1A99A83B00E8F95C /* Build configuration list for PBXNativeTarget "TLYShyNavBarSwiftDemoTests" */;
buildPhases = (
E7ADE61B1A99A83B00E8F95C /* Sources */,
E7ADE61C1A99A83B00E8F95C /* Frameworks */,
E7ADE61D1A99A83B00E8F95C /* Resources */,
);
buildRules = (
);
dependencies = (
E7ADE6211A99A83B00E8F95C /* PBXTargetDependency */,
);
name = TLYShyNavBarSwiftDemoTests;
productName = TLYShyNavBarSwiftDemoTests;
productReference = E7ADE61F1A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
E7ADE6021A99A83B00E8F95C /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Acktie, LLC";
TargetAttributes = {
E7ADE6091A99A83B00E8F95C = {
CreatedOnToolsVersion = 6.1.1;
};
E7ADE61E1A99A83B00E8F95C = {
CreatedOnToolsVersion = 6.1.1;
TestTargetID = E7ADE6091A99A83B00E8F95C;
};
};
};
buildConfigurationList = E7ADE6051A99A83B00E8F95C /* Build configuration list for PBXProject "TLYShyNavBarSwiftDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = E7ADE6011A99A83B00E8F95C;
productRefGroup = E7ADE60B1A99A83B00E8F95C /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
E7ADE6091A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */,
E7ADE61E1A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
E7ADE6081A99A83B00E8F95C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E7ADE6151A99A83B00E8F95C /* Main.storyboard in Resources */,
E7ADE61A1A99A83B00E8F95C /* LaunchScreen.xib in Resources */,
E7ADE6171A99A83B00E8F95C /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E7ADE61D1A99A83B00E8F95C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
E7ADE6061A99A83B00E8F95C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
826F86741BF8123D000F9216 /* TLYShyNavBarManager.m in Sources */,
826F86731BF8123D000F9216 /* TLYShyViewController.m in Sources */,
826F86721BF8123D000F9216 /* TLYShyStatusBarController.m in Sources */,
E7ADE6421A99AB5800E8F95C /* TableViewController.swift in Sources */,
826F86711BF8123D000F9216 /* TLYShyScrollViewController.m in Sources */,
826F86701BF8123D000F9216 /* UIViewController+BetterLayoutGuides.m in Sources */,
E7ADE6101A99A83B00E8F95C /* AppDelegate.swift in Sources */,
826F866D1BF8123D000F9216 /* NSObject+TLYSwizzlingHelpers.m in Sources */,
826F866E1BF8123D000F9216 /* TLYDelegateProxy.m in Sources */,
826F866F1BF8123D000F9216 /* UIScrollView+Helpers.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
E7ADE61B1A99A83B00E8F95C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E7ADE6261A99A83B00E8F95C /* TLYShyNavBarSwiftDemoTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
E7ADE6211A99A83B00E8F95C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = E7ADE6091A99A83B00E8F95C /* TLYShyNavBarSwiftDemo */;
targetProxy = E7ADE6201A99A83B00E8F95C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
E7ADE6131A99A83B00E8F95C /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
E7ADE6141A99A83B00E8F95C /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
E7ADE6181A99A83B00E8F95C /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
E7ADE6191A99A83B00E8F95C /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
E7ADE6271A99A83B00E8F95C /* 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;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
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 = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
E7ADE6281A99A83B00E8F95C /* 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 = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
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 = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
E7ADE62A1A99A83B00E8F95C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
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";
};
name = Debug;
};
E7ADE62B1A99A83B00E8F95C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
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";
};
name = Release;
};
E7ADE62D1A99A83B00E8F95C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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";
};
name = Debug;
};
E7ADE62E1A99A83B00E8F95C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
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";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
E7ADE6051A99A83B00E8F95C /* Build configuration list for PBXProject "TLYShyNavBarSwiftDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E7ADE6271A99A83B00E8F95C /* Debug */,
E7ADE6281A99A83B00E8F95C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E7ADE6291A99A83B00E8F95C /* Build configuration list for PBXNativeTarget "TLYShyNavBarSwiftDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E7ADE62A1A99A83B00E8F95C /* Debug */,
E7ADE62B1A99A83B00E8F95C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E7ADE62C1A99A83B00E8F95C /* Build configuration list for PBXNativeTarget "TLYShyNavBarSwiftDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E7ADE62D1A99A83B00E8F95C /* Debug */,
E7ADE62E1A99A83B00E8F95C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = E7ADE6021A99A83B00E8F95C /* Project object */;
}

View File

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

View File

@ -0,0 +1,41 @@
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>72C64448-CAFE-4F5D-8307-0D51A162F41F</string>
<key>IDESourceControlProjectName</key>
<string>TLYShyNavBarSwiftDemo</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>58D55ECABAD5AAEB583BB3898420091CC2A418B2</key>
<string>github.com:TNuzzi/TLYShyNavBar.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>TLYShyNavBarSwiftDemo/TLYShyNavBarSwiftDemo.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>58D55ECABAD5AAEB583BB3898420091CC2A418B2</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>github.com:TNuzzi/TLYShyNavBar.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>58D55ECABAD5AAEB583BB3898420091CC2A418B2</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>58D55ECABAD5AAEB583BB3898420091CC2A418B2</string>
<key>IDESourceControlWCCName</key>
<string>TLYShyNavBar</string>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,21 @@
//
// AppDelegate.swift
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
return true
}
}

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<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="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"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<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 firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>

View File

@ -0,0 +1,76 @@
<?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" useTraitCollections="YES" initialViewController="gcu-PF-Kdc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="VSn-a0-VnN">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="gcu-PF-Kdc" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="mgn-kU-u8h">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<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

@ -0,0 +1,38 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,40 @@
<?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>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,41 @@
//
// TableViewController.swift
// TLYShyNavBarSwiftDemo
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit
class TableViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
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
}
}
extension TableViewController: UITableViewDataSource {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 50
}
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

@ -0,0 +1,24 @@
<?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>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -0,0 +1,36 @@
//
// TLYShyNavBarSwiftDemoTests.swift
// TLYShyNavBarSwiftDemoTests
//
// Created by Tony Nuzzi on 2/22/15.
// Copyright (c) 2015 Telly, Inc. All rights reserved.
//
import UIKit
import XCTest
class TLYShyNavBarSwiftDemoTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}

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: 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

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