Misc fixes
- Typo - Remove <FLEX/...> import syntax added by #353 which causes compilation errors when building FLEX as a part of a different target (as opposed to building it as its own target) - Fix iOS 13 glitch
This commit is contained in:
@@ -39,11 +39,6 @@ extern CGFloat const kFLEXDebounceForExpensiveIO;
|
||||
///
|
||||
/// Setting this to YES will initialize searchController and the view.
|
||||
@property (nonatomic) BOOL showsSearchBar;
|
||||
/// Defaults to NO.
|
||||
///
|
||||
/// Setting this to YES will make the search bar appear whenever the view appears.
|
||||
/// Otherwise, iOS will only show the search bar when you scroll up.
|
||||
@property (nonatomic) BOOL hideSearchBarInitially;
|
||||
|
||||
/// nil unless showsSearchBar is set to YES.
|
||||
///
|
||||
|
||||
@@ -147,22 +147,12 @@ CGFloat const kFLEXDebounceForExpensiveIO = 0.5;
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
// Make the search bar re-appear instead of hiding
|
||||
if (@available(iOS 11.0, *)) if (!self.hideSearchBarInitially) {
|
||||
// When going back, make the search bar reappear instead of hiding
|
||||
if (@available(iOS 11.0, *)) if (self.pinSearchBar) {
|
||||
self.navigationItem.hidesSearchBarWhenScrolling = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
// Allow scrolling to collapse the search bar,
|
||||
// only if we don't want it pinned
|
||||
if (@available(iOS 11.0, *)) if (!self.hideSearchBarInitially) {
|
||||
self.navigationItem.hidesSearchBarWhenScrolling = !self.pinSearchBar;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <FLEX/FLEXTableViewController.h>
|
||||
#import "FLEXTableViewController.h"
|
||||
|
||||
@interface FLEXTableListViewController : FLEXTableViewController
|
||||
|
||||
|
||||
@@ -162,7 +162,6 @@ static __weak UIWindow *s_applicationWindow = nil;
|
||||
|
||||
self.title = @"💪 FLEX";
|
||||
self.showsSearchBar = YES;
|
||||
self.hideSearchBarInitially = YES;
|
||||
self.searchBarDebounceInterval = kFLEXDebounceInstant;
|
||||
|
||||
// Table view data
|
||||
@@ -179,7 +178,11 @@ static __weak UIWindow *s_applicationWindow = nil;
|
||||
}
|
||||
|
||||
// Done button
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
|
||||
target:self
|
||||
action:@selector(donePressed:)
|
||||
];
|
||||
}
|
||||
|
||||
#pragma mark - Search Bar
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
case FLEXGlobalsRowCurrentDevice:
|
||||
return @"📱 UIDevice.currentDevice";
|
||||
case FLEXGlobalsRowPasteboard:
|
||||
return @"📋 UIPasteboard.generalPastboard";
|
||||
return @"📋 UIPasteboard.generalPasteboard";
|
||||
default: return nil;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user