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
This commit is contained in:
Maz Jaleel 2016-01-30 22:43:10 +09:00
commit b0eacc80bf
2 changed files with 12 additions and 0 deletions

View File

@ -110,4 +110,9 @@
/* Initially, this is nil, but created for you when you access it */
@property (nonatomic, strong) TLYShyNavBarManager *shyNavBarManager;
/* 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

@ -485,6 +485,13 @@ static char shyNavBarManagerKey;
[self tly_swizzledViewWillDisappear:animated];
}
#pragma mark - Public methods
- (BOOL)isShyNavBarManagerPresent
{
return [self _internalShyNavBarManager] != nil;
}
#pragma mark - Properties
- (void)setShyNavBarManager:(TLYShyNavBarManager *)shyNavBarManager