[NEW]: expose the extension view. We may need it
This commit is contained in:
parent
78ac2c53d9
commit
796f5f5e1e
|
|
@ -35,6 +35,10 @@
|
|||
*/
|
||||
@property (nonatomic, weak) 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.
|
||||
*/
|
||||
|
|
@ -46,8 +50,6 @@
|
|||
@property (nonatomic) CGFloat expansionResistance; // default 200
|
||||
@property (nonatomic) CGFloat contractionResistance; // default 0
|
||||
|
||||
- (void)setExtensionView:(UIView *)view;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -238,13 +238,9 @@ static inline CGFloat AACStatusBarHeight()
|
|||
|
||||
- (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];
|
||||
|
||||
CGRect bounds = view.frame;
|
||||
bounds.origin = CGPointZero;
|
||||
|
|
|
|||
Loading…
Reference in New Issue