Compare commits
88 Commits
feature/reflex
...
bazel
| Author | SHA1 | Date | |
|---|---|---|---|
| cf1c33a400 | |||
| 4bc797458a | |||
| 09570e3598 | |||
| 89d07a14e1 | |||
| 1bbf8dbea1 | |||
| 343eba92b6 | |||
| d6232baf03 | |||
| 9808b89d6d | |||
| de1cbfae4a | |||
| b036fb18a5 | |||
| c6ed5098cf | |||
| d7283cd22d | |||
| 785e181d75 | |||
| dd66f46a7b | |||
| 55bae8b53e | |||
| 5edca3fdad | |||
| 9bc319a38e | |||
| deac628b06 | |||
| 8e44d88c36 | |||
| 73e4a712e8 | |||
| 9e1f60b2f4 | |||
| 3c385143ee | |||
| e0acf59d06 | |||
| f00af28418 | |||
| 2bd809ae6c | |||
| 003b8f88e8 | |||
| 5e780e6d0c | |||
| 17ea4976c1 | |||
| fbda722f11 | |||
| b351b788d5 | |||
| a195840b67 | |||
| 9b946dda5d | |||
| 806cdc6acb | |||
| aadfc69f01 | |||
| 6e0135d4a0 | |||
| 2599a1eb0d | |||
| c96df6d35c | |||
| fff3059099 | |||
| 4bee6d17bc | |||
| 3d8a12027b | |||
| bc96542856 | |||
| 24526a6a0a | |||
| d33d909fa0 | |||
| 0a9db69419 | |||
| 2db78c3bef | |||
| 1b91bc963e | |||
| 56d90748cb | |||
| 9997721e0a | |||
| bedbd0b8c8 | |||
| cb64c88c59 | |||
| be733c30cb | |||
| e46d26034b | |||
| 3809ece1f9 | |||
| b2410750fd | |||
| 72ccd007b3 | |||
| 4375f1a67f | |||
| 393a43754c | |||
| b56d6f6d33 | |||
| 0d985b504b | |||
| 148890914d | |||
| c734ad16e5 | |||
| ac6301437b | |||
| b45c655ba2 | |||
| 83fe11210e | |||
| e80e3bb5b7 | |||
| 833b8e7534 | |||
| 56e8693c41 | |||
| 49eeb28464 | |||
| a24d752313 | |||
| 643523a779 | |||
| 65744675db | |||
| f994346919 | |||
| a7a8b8e33e | |||
| f254720408 | |||
| e6fd5ed24e | |||
| d13f263492 | |||
| ba36647398 | |||
| 9d97533649 | |||
| 96b13e66b6 | |||
| 9712a4c869 | |||
| 8f9956308f | |||
| 69e88acbee | |||
| 07587986df | |||
| e6641a5f9d | |||
| 111fb6c9e6 | |||
| 995e7eadbe | |||
| ac50a6d36b | |||
| af40ce0909 |
@@ -21,3 +21,5 @@ DerivedData
|
||||
Podfile.lock
|
||||
IDEWorkspaceChecks.plist
|
||||
*.xcworkspace
|
||||
.build
|
||||
bazel-*
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
FLEX_PUBLIC_HDRS = glob([
|
||||
"Classes/*.h",
|
||||
"Classes/Manager/*.h",
|
||||
"Classes/Toolbar/*.h",
|
||||
"Classes/Core/**/*.h",
|
||||
"Classes/Utility/Runtime/Objc/**/*.h",
|
||||
"Classes/Utility/Runtime/Objc/*.h",
|
||||
"Classes/ObjectExplorers/**/*.h",
|
||||
"Classes/Editing/**/*.h",
|
||||
"Classes/GlobalStateExplorers/**/*.h",
|
||||
"Classes/Utility/Categories/*.h",
|
||||
], [
|
||||
"**/FLEX.h"
|
||||
], allow_empty = False
|
||||
) + [
|
||||
"Classes/Utility/FLEXMacros.h",
|
||||
"Classes/Utility/FLEXAlert.h",
|
||||
"Classes/Utility/FLEXResources.h",
|
||||
"Classes/Utility/FLEXHeapEnumerator.h"
|
||||
]
|
||||
|
||||
objc_library(
|
||||
name = "FLEX",
|
||||
module_name = "FLEX",
|
||||
hdrs = FLEX_PUBLIC_HDRS,
|
||||
srcs = glob([
|
||||
"Classes/**/*.m",
|
||||
"Classes/**/*.mm",
|
||||
"Classes/**/*.c",
|
||||
"Classes/**/*.h"
|
||||
], FLEX_PUBLIC_HDRS, allow_empty = False),
|
||||
sdk_dylibs = [
|
||||
"libz",
|
||||
"libsqlite3"
|
||||
],
|
||||
sdk_frameworks = [
|
||||
"Foundation",
|
||||
"UIKit",
|
||||
"CoreGraphics",
|
||||
"ImageIO",
|
||||
"QuartzCore",
|
||||
"WebKit",
|
||||
"Security",
|
||||
"SceneKit"
|
||||
],
|
||||
copts = [
|
||||
"-Wno-deprecated-declarations",
|
||||
"-Wno-unsupported-availability-guard"
|
||||
],
|
||||
visibility = ["//visibility:public"]
|
||||
)
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
|
||||
#pragma mark - FLEXTableViewFiltering
|
||||
@protocol FLEXTableViewFiltering <FLEXSearchResultsUpdating>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "FLEXTableViewSection.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "FLEXMacros.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableViewSection.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/FLEXMacros.h"
|
||||
|
||||
@interface FLEXFilteringTableViewController ()
|
||||
|
||||
|
||||
@@ -16,4 +16,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@end
|
||||
|
||||
@interface UINavigationController (FLEXObjectExploring)
|
||||
|
||||
/// Push an object explorer view controller onto the navigation stack
|
||||
- (void)pushExplorerForObject:(id)object;
|
||||
/// Push an object explorer view controller onto the navigation stack
|
||||
- (void)pushExplorerForObject:(id)object animated:(BOOL)animated;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXNavigationController.h"
|
||||
#import "FLEXExplorerViewController.h"
|
||||
#import "FLEXTabList.h"
|
||||
#import "Classes/Headers/FLEXNavigationController.h"
|
||||
#import "Classes/ExplorerInterface/FLEXExplorerViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabList.h"
|
||||
|
||||
@interface UINavigationController (Private) <UIGestureRecognizerDelegate>
|
||||
- (void)_gestureRecognizedInteractiveHide:(UIGestureRecognizer *)sender;
|
||||
@@ -28,7 +29,8 @@
|
||||
@implementation FLEXNavigationController
|
||||
|
||||
+ (instancetype)withRootViewController:(UIViewController *)rootVC {
|
||||
return [[self alloc] initWithRootViewController:rootVC];
|
||||
FLEXNavigationController *nav = [[self alloc] initWithRootViewController:rootVC];
|
||||
return nav;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
@@ -65,6 +67,17 @@
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
if (@available(iOS 15.0, *)) {
|
||||
UISheetPresentationController *presenter = self.sheetPresentationController;
|
||||
presenter.detents = @[
|
||||
UISheetPresentationControllerDetent.mediumDetent,
|
||||
UISheetPresentationControllerDetent.largeDetent,
|
||||
];
|
||||
presenter.prefersScrollingExpandsWhenScrolledToEdge = NO;
|
||||
presenter.selectedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge;
|
||||
presenter.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge;
|
||||
}
|
||||
|
||||
if (self.beingPresented && !self.didSetupPendingDismissButtons) {
|
||||
for (UIViewController *vc in self.viewControllers) {
|
||||
[self addNavigationBarItemsToViewController:vc.navigationItem];
|
||||
@@ -93,6 +106,13 @@
|
||||
[self addNavigationBarItemsToViewController:viewController.navigationItem];
|
||||
}
|
||||
|
||||
- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion {
|
||||
// Workaround for UIActivityViewController trying to dismiss us for some reason
|
||||
if (![self.viewControllers.lastObject.presentedViewController isKindOfClass:UIActivityViewController.self]) {
|
||||
[super dismissViewControllerAnimated:flag completion:completion];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dismissAnimated {
|
||||
// Tabs are only closed if the done button is pressed; this
|
||||
// allows you to leave a tab open by dragging down to dismiss
|
||||
@@ -194,3 +214,18 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation UINavigationController (FLEXObjectExploring)
|
||||
|
||||
- (void)pushExplorerForObject:(id)object {
|
||||
[self pushExplorerForObject:object animated:YES];
|
||||
}
|
||||
|
||||
- (void)pushExplorerForObject:(id)object animated:(BOOL)animated {
|
||||
UIViewController *explorer = [FLEXObjectExplorerFactory explorerViewControllerForObject:object];
|
||||
if (explorer) {
|
||||
[self pushViewController:explorer animated:animated];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
@class FLEXScopeCarousel, FLEXWindow, FLEXTableViewSection;
|
||||
|
||||
typedef CGFloat FLEXDebounceInterval;
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "FLEXExplorerViewController.h"
|
||||
#import "FLEXBookmarksViewController.h"
|
||||
#import "FLEXTabsViewController.h"
|
||||
#import "FLEXScopeCarousel.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXResources.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
#import "Classes/ExplorerInterface/FLEXExplorerViewController.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarksViewController.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabsViewController.h"
|
||||
#import "Classes/Core/Views/Carousel/FLEXScopeCarousel.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXResources.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@interface Block : NSObject
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewSection.h"
|
||||
#import "Classes/Headers/FLEXTableViewSection.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// A section providing a specific single row.
|
||||
///
|
||||
@@ -16,13 +18,15 @@
|
||||
@interface FLEXSingleRowSection : FLEXTableViewSection
|
||||
|
||||
/// @param reuseIdentifier if nil, kFLEXDefaultCell is used.
|
||||
+ (instancetype)title:(NSString *)sectionTitle
|
||||
reuse:(NSString *)reuseIdentifier
|
||||
+ (instancetype)title:(nullable NSString *)sectionTitle
|
||||
reuse:(nullable NSString *)reuseIdentifier
|
||||
cell:(void(^)(__kindof UITableViewCell *cell))cellConfiguration;
|
||||
|
||||
@property (nonatomic) UIViewController *pushOnSelection;
|
||||
@property (nonatomic) void (^selectionAction)(UIViewController *host);
|
||||
@property (nullable, nonatomic) UIViewController *pushOnSelection;
|
||||
@property (nullable, nonatomic) void (^selectionAction)(UIViewController *host);
|
||||
/// Called to determine whether the single row should display itself or not.
|
||||
@property (nonatomic) BOOL (^filterMatcher)(NSString *filterText);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXSingleRowSection.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/Headers/FLEXSingleRowSection.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
|
||||
@interface FLEXSingleRowSection ()
|
||||
@property (nonatomic, readonly) NSString *reuseIdentifier;
|
||||
@@ -30,6 +30,8 @@
|
||||
- (id)initWithTitle:(NSString *)sectionTitle
|
||||
reuse:(NSString *)reuseIdentifier
|
||||
cell:(void (^)(__kindof UITableViewCell *))cellConfiguration {
|
||||
NSParameterAssert(cellConfiguration);
|
||||
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_title = sectionTitle;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
@class FLEXTableView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewSection.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "UIMenu+FLEX.h"
|
||||
#import "Classes/Headers/FLEXTableViewSection.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/Categories/UIMenu+FLEX.h"
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wincomplete-implementation"
|
||||
@@ -79,7 +79,7 @@
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (NSArray<UIMenuElement *> *)menuItemsForRow:(NSInteger)row sender:(UIViewController *)sender API_AVAILABLE(ios(13)) {
|
||||
- (NSArray<UIMenuElement *> *)menuItemsForRow:(NSInteger)row sender:(UIViewController *)sender API_AVAILABLE(ios(13.0)) {
|
||||
NSArray<NSString *> *copyItems = [self copyMenuItemsForRow:row];
|
||||
NSAssert(copyItems.count % 2 == 0, @"copyMenuItemsForRow: should return an even list");
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXCarouselCell.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "UIView+FLEX_Layout.h"
|
||||
#import "Classes/Core/Views/Carousel/FLEXCarouselCell.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/Categories/Private/UIView+FLEX_Layout.h"
|
||||
|
||||
@interface FLEXCarouselCell ()
|
||||
@property (nonatomic, readonly) UILabel *titleLabel;
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXScopeCarousel.h"
|
||||
#import "FLEXCarouselCell.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "FLEXMacros.h"
|
||||
#import "UIView+FLEX_Layout.h"
|
||||
#import "Classes/Core/Views/Carousel/FLEXScopeCarousel.h"
|
||||
#import "Classes/Core/Views/Carousel/FLEXCarouselCell.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/FLEXMacros.h"
|
||||
#import "Classes/Utility/Categories/Private/UIView+FLEX_Layout.h"
|
||||
|
||||
const CGFloat kCarouselItemSpacing = 0;
|
||||
NSString * const kCarouselCellReuseIdentifier = @"kCarouselCellReuseIdentifier";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXMultilineTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXMultilineTableViewCell.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXCodeFontCell.h"
|
||||
#import "UIFont+FLEX.h"
|
||||
#import "Classes/Headers/FLEXCodeFontCell.h"
|
||||
#import "Classes/Utility/Categories/UIFont+FLEX.h"
|
||||
|
||||
@implementation FLEXCodeFontCell
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXTableViewCell.h"
|
||||
|
||||
@interface FLEXKeyValueTableViewCell : FLEXTableViewCell
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXKeyValueTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXKeyValueTableViewCell.h"
|
||||
|
||||
@implementation FLEXKeyValueTableViewCell
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXTableViewCell.h"
|
||||
|
||||
/// A cell with both labels set to be multi-line capable.
|
||||
@interface FLEXMultilineTableViewCell : FLEXTableViewCell
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXMultilineTableViewCell.h"
|
||||
#import "UIView+FLEX_Layout.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/Headers/FLEXMultilineTableViewCell.h"
|
||||
#import "Classes/Utility/Categories/Private/UIView+FLEX_Layout.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXMultilineTableViewCell ()
|
||||
@property (nonatomic, readonly) UILabel *_titleLabel;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXTableViewCell.h"
|
||||
|
||||
/// A cell initialized with \c UITableViewCellStyleSubtitle
|
||||
@interface FLEXSubtitleTableViewCell : FLEXTableViewCell
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXSubtitleTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXSubtitleTableViewCell.h"
|
||||
|
||||
@implementation FLEXSubtitleTableViewCell
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewCell.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/Headers/FLEXTableViewCell.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
|
||||
@interface UITableView (Internal)
|
||||
// Exists at least since iOS 5
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXSubtitleTableViewCell.h"
|
||||
#import "FLEXMultilineTableViewCell.h"
|
||||
#import "FLEXKeyValueTableViewCell.h"
|
||||
#import "FLEXCodeFontCell.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Headers/FLEXSubtitleTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXMultilineTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXKeyValueTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXCodeFontCell.h"
|
||||
|
||||
FLEXTableViewCellReuseIdentifier const kFLEXDefaultCell = @"kFLEXDefaultCell";
|
||||
FLEXTableViewCellReuseIdentifier const kFLEXDetailCell = @"kFLEXDetailCell";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputColorView : FLEXArgumentInputView
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputColorView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@protocol FLEXColorComponentInputViewDelegate;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputDateView : FLEXArgumentInputView
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputDateView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputDateView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@interface FLEXArgumentInputDateView ()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputFontView : FLEXArgumentInputView
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputFontView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXArgumentInputFontsPickerView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontsPickerView.h"
|
||||
|
||||
@interface FLEXArgumentInputFontView ()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2014年 f. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
|
||||
@interface FLEXArgumentInputFontsPickerView : FLEXArgumentInputTextView <UIPickerViewDataSource, UIPickerViewDelegate>
|
||||
@end
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2014年 f. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputFontsPickerView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontsPickerView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@interface FLEXArgumentInputFontsPickerView ()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
|
||||
@interface FLEXArgumentInputNotSupportedView : FLEXArgumentInputTextView
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputNotSupportedView.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputNotSupportedView.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
|
||||
@implementation FLEXArgumentInputNotSupportedView
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
|
||||
@interface FLEXArgumentInputNumberView : FLEXArgumentInputTextView
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputNumberView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputNumberView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@implementation FLEXArgumentInputNumberView
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
|
||||
@interface FLEXArgumentInputObjectView : FLEXArgumentInputTextView
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputObjectView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputObjectView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
static const CGFloat kSegmentInputMargin = 10;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
|
||||
@interface FLEXArgumentInputStringView : FLEXArgumentInputTextView
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputStringView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputStringView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@implementation FLEXArgumentInputStringView
|
||||
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputStructView : FLEXArgumentInputView
|
||||
|
||||
/// Enable displaying ivar names for custom struct types
|
||||
+ (void)registerFieldNames:(NSArray<NSString *> *)names forTypeEncoding:(NSString *)typeEncoding;
|
||||
|
||||
@end
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputStructView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXTypeEncodingParser.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputStructView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXTypeEncodingParser.h"
|
||||
|
||||
@interface FLEXArgumentInputStructView ()
|
||||
|
||||
@@ -19,6 +19,41 @@
|
||||
|
||||
@implementation FLEXArgumentInputStructView
|
||||
|
||||
static NSMutableDictionary<NSString *, NSArray<NSString *> *> *structFieldNameRegistrar = nil;
|
||||
+ (void)initialize {
|
||||
if (self == [FLEXArgumentInputStructView class]) {
|
||||
structFieldNameRegistrar = [NSMutableDictionary new];
|
||||
[self registerDefaultFieldNames];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)registerDefaultFieldNames {
|
||||
NSDictionary *defaults = @{
|
||||
@(@encode(CGRect)): @[@"CGPoint origin", @"CGSize size"],
|
||||
@(@encode(CGPoint)): @[@"CGFloat x", @"CGFloat y"],
|
||||
@(@encode(CGSize)): @[@"CGFloat width", @"CGFloat height"],
|
||||
@(@encode(CGVector)): @[@"CGFloat dx", @"CGFloat dy"],
|
||||
@(@encode(UIEdgeInsets)): @[@"CGFloat top", @"CGFloat left", @"CGFloat bottom", @"CGFloat right"],
|
||||
@(@encode(UIOffset)): @[@"CGFloat horizontal", @"CGFloat vertical"],
|
||||
@(@encode(NSRange)): @[@"NSUInteger location", @"NSUInteger length"],
|
||||
@(@encode(CATransform3D)): @[@"CGFloat m11", @"CGFloat m12", @"CGFloat m13", @"CGFloat m14",
|
||||
@"CGFloat m21", @"CGFloat m22", @"CGFloat m23", @"CGFloat m24",
|
||||
@"CGFloat m31", @"CGFloat m32", @"CGFloat m33", @"CGFloat m34",
|
||||
@"CGFloat m41", @"CGFloat m42", @"CGFloat m43", @"CGFloat m44"],
|
||||
@(@encode(CGAffineTransform)): @[@"CGFloat a", @"CGFloat b",
|
||||
@"CGFloat c", @"CGFloat d",
|
||||
@"CGFloat tx", @"CGFloat ty"],
|
||||
};
|
||||
|
||||
[structFieldNameRegistrar addEntriesFromDictionary:defaults];
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
structFieldNameRegistrar[@(@encode(NSDirectionalEdgeInsets))] = @[
|
||||
@"CGFloat top", @"CGFloat leading", @"CGFloat bottom", @"CGFloat trailing"
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype)initWithArgumentTypeEncoding:(const char *)typeEncoding {
|
||||
self = [super initWithArgumentTypeEncoding:typeEncoding];
|
||||
if (self) {
|
||||
@@ -181,40 +216,13 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (void)registerFieldNames:(NSArray<NSString *> *)names forTypeEncoding:(NSString *)typeEncoding {
|
||||
NSParameterAssert(typeEncoding); NSParameterAssert(names);
|
||||
structFieldNameRegistrar[typeEncoding] = names;
|
||||
}
|
||||
|
||||
+ (NSArray<NSString *> *)customFieldTitlesForTypeEncoding:(const char *)typeEncoding {
|
||||
NSArray<NSString *> *customTitles = nil;
|
||||
if (strcmp(typeEncoding, @encode(CGRect)) == 0) {
|
||||
customTitles = @[@"CGPoint origin", @"CGSize size"];
|
||||
} else if (strcmp(typeEncoding, @encode(CGPoint)) == 0) {
|
||||
customTitles = @[@"CGFloat x", @"CGFloat y"];
|
||||
} else if (strcmp(typeEncoding, @encode(CGSize)) == 0) {
|
||||
customTitles = @[@"CGFloat width", @"CGFloat height"];
|
||||
} else if (strcmp(typeEncoding, @encode(CGVector)) == 0) {
|
||||
customTitles = @[@"CGFloat dx", @"CGFloat dy"];
|
||||
} else if (strcmp(typeEncoding, @encode(UIEdgeInsets)) == 0) {
|
||||
customTitles = @[@"CGFloat top", @"CGFloat left", @"CGFloat bottom", @"CGFloat right"];
|
||||
} else if (strcmp(typeEncoding, @encode(UIOffset)) == 0) {
|
||||
customTitles = @[@"CGFloat horizontal", @"CGFloat vertical"];
|
||||
} else if (strcmp(typeEncoding, @encode(NSRange)) == 0) {
|
||||
customTitles = @[@"NSUInteger location", @"NSUInteger length"];
|
||||
} else if (strcmp(typeEncoding, @encode(CATransform3D)) == 0) {
|
||||
customTitles = @[@"CGFloat m11", @"CGFloat m12", @"CGFloat m13", @"CGFloat m14",
|
||||
@"CGFloat m21", @"CGFloat m22", @"CGFloat m23", @"CGFloat m24",
|
||||
@"CGFloat m31", @"CGFloat m32", @"CGFloat m33", @"CGFloat m34",
|
||||
@"CGFloat m41", @"CGFloat m42", @"CGFloat m43", @"CGFloat m44"];
|
||||
} else if (strcmp(typeEncoding, @encode(CGAffineTransform)) == 0) {
|
||||
customTitles = @[@"CGFloat a", @"CGFloat b",
|
||||
@"CGFloat c", @"CGFloat d",
|
||||
@"CGFloat tx", @"CGFloat ty"];
|
||||
} else {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if (strcmp(typeEncoding, @encode(NSDirectionalEdgeInsets)) == 0) {
|
||||
customTitles = @[@"CGFloat top", @"CGFloat leading",
|
||||
@"CGFloat bottom", @"CGFloat trailing"];
|
||||
}
|
||||
}
|
||||
}
|
||||
return customTitles;
|
||||
return structFieldNameRegistrar[@(typeEncoding)];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputSwitchView : FLEXArgumentInputView
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputSwitchView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputSwitchView.h"
|
||||
|
||||
@interface FLEXArgumentInputSwitchView ()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
|
||||
@interface FLEXArgumentInputTextView : FLEXArgumentInputView <UITextViewDelegate>
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
//
|
||||
//
|
||||
|
||||
#import "FLEXColor.h"
|
||||
#import "FLEXArgumentInputTextView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputTextView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXArgumentInputTextView ()
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
|
||||
@interface FLEXArgumentInputView ()
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "FLEXArgumentInputSwitchView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputSwitchView.h"
|
||||
|
||||
@interface FLEXArgumentInputViewFactory : NSObject
|
||||
|
||||
@@ -21,4 +21,7 @@
|
||||
/// Useful when deciding whether to edit or explore a property, ivar, or NSUserDefaults value.
|
||||
+ (BOOL)canEditFieldWithTypeEncoding:(const char *)typeEncoding currentValue:(id)currentValue;
|
||||
|
||||
/// Enable displaying ivar names for custom struct types
|
||||
+ (void)registerFieldNames:(NSArray<NSString *> *)names forTypeEncoding:(NSString *)typeEncoding;
|
||||
|
||||
@end
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
//
|
||||
//
|
||||
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXArgumentInputObjectView.h"
|
||||
#import "FLEXArgumentInputNumberView.h"
|
||||
#import "FLEXArgumentInputSwitchView.h"
|
||||
#import "FLEXArgumentInputStructView.h"
|
||||
#import "FLEXArgumentInputNotSupportedView.h"
|
||||
#import "FLEXArgumentInputStringView.h"
|
||||
#import "FLEXArgumentInputFontView.h"
|
||||
#import "FLEXArgumentInputColorView.h"
|
||||
#import "FLEXArgumentInputDateView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputObjectView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputNumberView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputSwitchView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputStructView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputNotSupportedView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputStringView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputFontView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputDateView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
|
||||
@implementation FLEXArgumentInputViewFactory
|
||||
|
||||
@@ -67,4 +67,9 @@
|
||||
return [self argumentInputViewSubclassForTypeEncoding:typeEncoding currentValue:currentValue] != nil;
|
||||
}
|
||||
|
||||
/// Enable displaying ivar names for custom struct types
|
||||
+ (void)registerFieldNames:(NSArray<NSString *> *)names forTypeEncoding:(NSString *)typeEncoding {
|
||||
[FLEXArgumentInputStructView registerFieldNames:names forTypeEncoding:typeEncoding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFieldEditorViewController.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXDefaultEditorViewController.h"
|
||||
#import "FLEXFieldEditorView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Editing/FLEXDefaultEditorViewController.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
|
||||
@interface FLEXDefaultEditorViewController ()
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFieldEditorView.h"
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorView.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
|
||||
@interface FLEXFieldEditorView ()
|
||||
|
||||
@@ -122,7 +123,7 @@
|
||||
}
|
||||
|
||||
+ (UIColor *)dividerColor {
|
||||
return UIColor.lightGrayColor;
|
||||
return FLEXColor.tertiaryBackgroundColor;
|
||||
}
|
||||
|
||||
+ (CGFloat)horizontalPadding {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXVariableEditorViewController.h"
|
||||
#import "FLEXProperty.h"
|
||||
#import "FLEXIvar.h"
|
||||
#import "Classes/Editing/FLEXVariableEditorViewController.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXProperty.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXIvar.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,17 +6,19 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFieldEditorViewController.h"
|
||||
#import "FLEXFieldEditorView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXPropertyAttributes.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorViewController.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXPropertyAttributes.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMetadataExtras.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
|
||||
@interface FLEXFieldEditorViewController () <FLEXArgumentInputViewDelegate>
|
||||
|
||||
@property (nonatomic, readonly) id<FLEXMetadataAuxiliaryInfo> auxiliaryInfoProvider;
|
||||
@property (nonatomic) FLEXProperty *property;
|
||||
@property (nonatomic) FLEXIvar *ivar;
|
||||
|
||||
@@ -30,14 +32,14 @@
|
||||
|
||||
#pragma mark - Initialization
|
||||
|
||||
+ (instancetype)target:(id)target property:(nonnull FLEXProperty *)property commitHandler:(void(^_Nullable)(void))onCommit {
|
||||
+ (instancetype)target:(id)target property:(nonnull FLEXProperty *)property commitHandler:(void(^)(void))onCommit {
|
||||
FLEXFieldEditorViewController *editor = [self target:target data:property commitHandler:onCommit];
|
||||
editor.title = [@"Property: " stringByAppendingString:property.name];
|
||||
editor.property = property;
|
||||
return editor;
|
||||
}
|
||||
|
||||
+ (instancetype)target:(id)target ivar:(nonnull FLEXIvar *)ivar commitHandler:(void(^_Nullable)(void))onCommit {
|
||||
+ (instancetype)target:(id)target ivar:(nonnull FLEXIvar *)ivar commitHandler:(void(^)(void))onCommit {
|
||||
FLEXFieldEditorViewController *editor = [self target:target data:ivar commitHandler:onCommit];
|
||||
editor.title = [@"Ivar: " stringByAppendingString:ivar.name];
|
||||
editor.ivar = ivar;
|
||||
@@ -61,6 +63,8 @@
|
||||
self.toolbarItems = @[
|
||||
UIBarButtonItem.flex_flexibleSpace, self.getterButton, self.actionButton
|
||||
];
|
||||
|
||||
[self registerAuxiliaryInfo];
|
||||
|
||||
// Configure input view
|
||||
self.fieldEditorView.fieldDescription = self.fieldDescription;
|
||||
@@ -122,6 +126,17 @@
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (void)registerAuxiliaryInfo {
|
||||
// This is how Reflex will get Swift struct field names into the editor at runtime
|
||||
NSDictionary<NSString *, NSArray *> *labels = [self.auxiliaryInfoProvider
|
||||
auxiliaryInfoForKey:FLEXAuxiliarynfoKeyFieldLabels
|
||||
];
|
||||
|
||||
for (NSString *type in labels) {
|
||||
[FLEXArgumentInputViewFactory registerFieldNames:labels[type] forTypeEncoding:type];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)currentValue {
|
||||
if (self.property) {
|
||||
return [self.property getValue:self.target];
|
||||
@@ -130,6 +145,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (id<FLEXMetadataAuxiliaryInfo>)auxiliaryInfoProvider {
|
||||
return self.ivar ?: self.property;
|
||||
}
|
||||
|
||||
- (const FLEXTypeEncoding *)typeEncoding {
|
||||
if (self.property) {
|
||||
return self.property.attributes.typeEncoding.UTF8String;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXVariableEditorViewController.h"
|
||||
#import "FLEXMethod.h"
|
||||
#import "Classes/Editing/FLEXVariableEditorViewController.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMethod.h"
|
||||
|
||||
@interface FLEXMethodCallingViewController : FLEXVariableEditorViewController
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXMethodCallingViewController.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXFieldEditorView.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXObjectExplorerViewController.h"
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/Editing/FLEXMethodCallingViewController.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorView.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerViewController.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXMethodCallingViewController ()
|
||||
@property (nonatomic, readonly) FLEXMethod *method;
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXColor.h"
|
||||
#import "FLEXVariableEditorViewController.h"
|
||||
#import "FLEXFieldEditorView.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXArgumentInputView.h"
|
||||
#import "FLEXArgumentInputViewFactory.h"
|
||||
#import "FLEXObjectExplorerViewController.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Editing/FLEXVariableEditorViewController.h"
|
||||
#import "Classes/Editing/FLEXFieldEditorView.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Editing/ArgumentInputViews/FLEXArgumentInputView.h"
|
||||
#import "Classes/Editing/FLEXArgumentInputViewFactory.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerViewController.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
|
||||
@interface FLEXVariableEditorViewController () <UIScrollViewDelegate>
|
||||
@property (nonatomic) UIScrollView *scrollView;
|
||||
@@ -37,7 +37,7 @@
|
||||
_commitHandler = onCommit;
|
||||
[NSNotificationCenter.defaultCenter
|
||||
addObserver:self selector:@selector(keyboardDidShow:)
|
||||
name:UIKeyboardDidShowNotification object:nil
|
||||
name:UIKeyboardWillShowNotification object:nil
|
||||
];
|
||||
[NSNotificationCenter.defaultCenter
|
||||
addObserver:self selector:@selector(keyboardWillHide:)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXBookmarkManager.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarkManager.h"
|
||||
|
||||
static NSMutableArray *kFLEXBookmarkManagerBookmarks = nil;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXBookmarksViewController.h"
|
||||
#import "FLEXExplorerViewController.h"
|
||||
#import "FLEXNavigationController.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXBookmarkManager.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarksViewController.h"
|
||||
#import "Classes/ExplorerInterface/FLEXExplorerViewController.h"
|
||||
#import "Classes/Headers/FLEXNavigationController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarkManager.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
|
||||
@interface FLEXBookmarksViewController ()
|
||||
@property (nonatomic, copy) NSArray *bookmarks;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXExplorerToolbar.h"
|
||||
#import "Classes/Headers/FLEXExplorerToolbar.h"
|
||||
|
||||
@class FLEXWindow;
|
||||
@protocol FLEXExplorerViewControllerDelegate;
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXExplorerViewController.h"
|
||||
#import "FLEXExplorerToolbarItem.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXWindow.h"
|
||||
#import "FLEXTabList.h"
|
||||
#import "FLEXNavigationController.h"
|
||||
#import "FLEXHierarchyViewController.h"
|
||||
#import "FLEXGlobalsViewController.h"
|
||||
#import "FLEXObjectExplorerViewController.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXNetworkMITMViewController.h"
|
||||
#import "FLEXTabsViewController.h"
|
||||
#import "FLEXWindowManagerController.h"
|
||||
#import "FLEXViewControllersViewController.h"
|
||||
#import "NSUserDefaults+FLEX.h"
|
||||
#import "Classes/ExplorerInterface/FLEXExplorerViewController.h"
|
||||
#import "Classes/Headers/FLEXExplorerToolbarItem.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/ExplorerInterface/FLEXWindow.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabList.h"
|
||||
#import "Classes/Headers/FLEXNavigationController.h"
|
||||
#import "Classes/ViewHierarchy/FLEXHierarchyViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Network/FLEXNetworkMITMViewController.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabsViewController.h"
|
||||
#import "Classes/ExplorerInterface/FLEXWindowManagerController.h"
|
||||
#import "Classes/ExplorerInterface/FLEXViewControllersViewController.h"
|
||||
#import "Classes/Utility/Categories/NSUserDefaults+FLEX.h"
|
||||
|
||||
typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
FLEXExplorerModeDefault,
|
||||
@@ -129,6 +129,14 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
if (@available(iOS 10.0, *)) {
|
||||
_selectionFBG = [UISelectionFeedbackGenerator new];
|
||||
}
|
||||
|
||||
// Observe keyboard to move self out of the way
|
||||
[NSNotificationCenter.defaultCenter
|
||||
addObserver:self
|
||||
selector:@selector(keyboardShown:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil
|
||||
];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
@@ -162,7 +170,10 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
|
||||
UIViewController *viewControllerToAsk = [self viewControllerForRotationAndOrientation];
|
||||
UIInterfaceOrientationMask supportedOrientations = FLEXUtility.infoPlistSupportedInterfaceOrientationsMask;
|
||||
if (viewControllerToAsk && ![viewControllerToAsk isKindOfClass:[self class]]) {
|
||||
// We check its class by name because using isKindOfClass will fail for the same class defined
|
||||
// twice in the runtime; and the goal here is to avoid calling -supportedInterfaceOrientations
|
||||
// recursively when I'm inspecting FLEX with itself from a tweak dylib
|
||||
if (viewControllerToAsk && ![NSStringFromClass([viewControllerToAsk class]) hasPrefix:@"FLEX"]) {
|
||||
supportedOrientations = [viewControllerToAsk supportedInterfaceOrientations];
|
||||
}
|
||||
|
||||
@@ -375,6 +386,21 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
return [self.view convertRect:frameInWindow fromView:nil];
|
||||
}
|
||||
|
||||
- (void)keyboardShown:(NSNotification *)notif {
|
||||
CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
CGRect toolbarFrame = self.explorerToolbar.frame;
|
||||
|
||||
if (CGRectGetMinY(keyboardFrame) < CGRectGetMaxY(toolbarFrame)) {
|
||||
toolbarFrame.origin.y = keyboardFrame.origin.y - toolbarFrame.size.height;
|
||||
// Subtract a little more, to ignore accessory input views
|
||||
toolbarFrame.origin.y -= 50;
|
||||
|
||||
[UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:1 initialSpringVelocity:0.5
|
||||
options:UIViewAnimationOptionCurveEaseOut animations:^{
|
||||
[self updateToolbarPositionWithUnconstrainedFrame:toolbarFrame];
|
||||
} completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Toolbar Buttons
|
||||
|
||||
@@ -403,8 +429,12 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
}
|
||||
|
||||
- (UIWindow *)statusWindow {
|
||||
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
|
||||
return [UIApplication.sharedApplication valueForKey:statusBarString];
|
||||
if (!@available(iOS 16, *)) {
|
||||
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
|
||||
return [UIApplication.sharedApplication valueForKey:statusBarString];
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)recentButtonTapped:(FLEXExplorerToolbarItem *)sender {
|
||||
@@ -436,7 +466,11 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
toolbar.moveItem.selected = self.currentMode == FLEXExplorerModeMove;
|
||||
|
||||
// Recent only enabled when we have a last active tab
|
||||
toolbar.recentItem.enabled = FLEXTabList.sharedList.activeTab != nil;
|
||||
if (!self.presentedViewController) {
|
||||
toolbar.recentItem.enabled = FLEXTabList.sharedList.activeTab != nil;
|
||||
} else {
|
||||
toolbar.recentItem.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -818,31 +852,34 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
#pragma mark - Touch Handling
|
||||
|
||||
- (BOOL)shouldReceiveTouchAtWindowPoint:(CGPoint)pointInWindowCoordinates {
|
||||
BOOL shouldReceiveTouch = NO;
|
||||
|
||||
CGPoint pointInLocalCoordinates = [self.view convertPoint:pointInWindowCoordinates fromView:nil];
|
||||
|
||||
// Always if it's on the toolbar
|
||||
if (CGRectContainsPoint(self.explorerToolbar.frame, pointInLocalCoordinates)) {
|
||||
shouldReceiveTouch = YES;
|
||||
// If we have a modal presented, is it in the modal?
|
||||
if (self.presentedViewController) {
|
||||
UIView *presentedView = self.presentedViewController.view;
|
||||
CGPoint pipvc = [presentedView convertPoint:pointInLocalCoordinates fromView:self.view];
|
||||
UIView *hit = [presentedView hitTest:pipvc withEvent:nil];
|
||||
if (hit != nil) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
// Always if we're in selection mode
|
||||
if (!shouldReceiveTouch && self.currentMode == FLEXExplorerModeSelect) {
|
||||
shouldReceiveTouch = YES;
|
||||
if (self.currentMode == FLEXExplorerModeSelect) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Always in move mode too
|
||||
if (!shouldReceiveTouch && self.currentMode == FLEXExplorerModeMove) {
|
||||
shouldReceiveTouch = YES;
|
||||
if (self.currentMode == FLEXExplorerModeMove) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Always if we have a modal presented
|
||||
if (!shouldReceiveTouch && self.presentedViewController) {
|
||||
shouldReceiveTouch = YES;
|
||||
// Always if it's on the toolbar
|
||||
if (CGRectContainsPoint(self.explorerToolbar.frame, pointInLocalCoordinates)) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
return shouldReceiveTouch;
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
@@ -888,8 +925,14 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
// up in case we start replacing them again in the future
|
||||
self.appMenuItems = UIMenuController.sharedMenuController.menuItems;
|
||||
|
||||
[self updateButtonStates];
|
||||
|
||||
// Show the view controller
|
||||
[super presentViewController:toPresent animated:animated completion:completion];
|
||||
[super presentViewController:toPresent animated:animated completion:^{
|
||||
[self updateButtonStates];
|
||||
|
||||
if (completion) completion();
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)dismissViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion {
|
||||
@@ -910,7 +953,11 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
|
||||
|
||||
[self updateButtonStates];
|
||||
|
||||
[super dismissViewControllerAnimated:animated completion:completion];
|
||||
[super dismissViewControllerAnimated:animated completion:^{
|
||||
[self updateButtonStates];
|
||||
|
||||
if (completion) completion();
|
||||
}];
|
||||
}
|
||||
|
||||
- (BOOL)wantsWindowToBecomeKey {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXViewControllersViewController.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXMutableListSection.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/ExplorerInterface/FLEXViewControllersViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXViewControllersViewController ()
|
||||
@property (nonatomic, readonly) FLEXMutableListSection *section;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXWindow.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/ExplorerInterface/FLEXWindow.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@implementation FLEXWindow
|
||||
@@ -18,18 +18,13 @@
|
||||
// Some apps have windows at UIWindowLevelStatusBar + n.
|
||||
// If we make the window level too high, we block out UIAlertViews.
|
||||
// There's a balance between staying above the app's windows and staying below alerts.
|
||||
// UIWindowLevelStatusBar + 100 seems to hit that balance.
|
||||
self.windowLevel = UIWindowLevelStatusBar + 100.0;
|
||||
self.windowLevel = UIWindowLevelAlert - 1;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
BOOL pointInside = NO;
|
||||
if ([self.eventDelegate shouldHandleTouchAtPoint:point]) {
|
||||
pointInside = [super pointInside:point withEvent:event];
|
||||
}
|
||||
return pointInside;
|
||||
return [self.eventDelegate shouldHandleTouchAtPoint:point];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAffectStatusBarAppearance {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXWindowManagerController.h"
|
||||
#import "FLEXManager+Private.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/ExplorerInterface/FLEXWindowManagerController.h"
|
||||
#import "Classes/Manager/Private/FLEXManager+Private.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
|
||||
@interface FLEXWindowManagerController ()
|
||||
@property (nonatomic) UIWindow *keyWindow;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTabList.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabList.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXTabList () {
|
||||
NSMutableArray *_openTabs;
|
||||
@@ -84,6 +84,16 @@
|
||||
if (idx != NSNotFound) {
|
||||
[self closeTabAtIndex:idx];
|
||||
}
|
||||
|
||||
// Not sure how this is possible, but it happens sometimes
|
||||
if (self.activeTab == tab) {
|
||||
[self chooseNewActiveTab];
|
||||
}
|
||||
|
||||
// It is possible for an object explorer to form a retain cycle
|
||||
// with its own navigation controller; clearing the view controllers
|
||||
// manually when closing a tab breaks the cycle
|
||||
tab.viewControllers = @[];
|
||||
}
|
||||
|
||||
- (void)closeTabAtIndex:(NSInteger)idx {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
|
||||
@interface FLEXTabsViewController : FLEXTableViewController
|
||||
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTabsViewController.h"
|
||||
#import "FLEXNavigationController.h"
|
||||
#import "FLEXTabList.h"
|
||||
#import "FLEXBookmarkManager.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "FLEXExplorerViewController.h"
|
||||
#import "FLEXGlobalsViewController.h"
|
||||
#import "FLEXBookmarksViewController.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabsViewController.h"
|
||||
#import "Classes/Headers/FLEXNavigationController.h"
|
||||
#import "Classes/ExplorerInterface/Tabs/FLEXTabList.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarkManager.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/ExplorerInterface/FLEXExplorerViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsViewController.h"
|
||||
#import "Classes/ExplorerInterface/Bookmarks/FLEXBookmarksViewController.h"
|
||||
|
||||
@interface FLEXTabsViewController ()
|
||||
@property (nonatomic, copy) NSArray<UINavigationController *> *openTabs;
|
||||
|
||||
+12
-11
@@ -6,15 +6,16 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "CALayer+FLEX.h"
|
||||
#import "UIFont+FLEX.h"
|
||||
#import "UIGestureRecognizer+Blocks.h"
|
||||
#import "UIPasteboard+FLEX.h"
|
||||
#import "UIMenu+FLEX.h"
|
||||
#import "UITextField+Range.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Utility/Categories/CALayer+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UIFont+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UIGestureRecognizer+Blocks.h"
|
||||
#import "Classes/Utility/Categories/UIPasteboard+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UIMenu+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UITextField+Range.h"
|
||||
|
||||
#import "NSObject+FLEX_Reflection.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "NSUserDefaults+FLEX.h"
|
||||
#import "NSTimer+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSObject+FLEX_Reflection.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSUserDefaults+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSTimer+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSDateFormatter+FLEX.h"
|
||||
|
||||
+11
-11
@@ -6,17 +6,17 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "FLEXNavigationController.h"
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
#import "Classes/Headers/FLEXNavigationController.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
|
||||
#import "FLEXSingleRowSection.h"
|
||||
#import "FLEXTableViewSection.h"
|
||||
#import "Classes/Headers/FLEXSingleRowSection.h"
|
||||
#import "Classes/Headers/FLEXTableViewSection.h"
|
||||
|
||||
#import "FLEXCodeFontCell.h"
|
||||
#import "FLEXSubtitleTableViewCell.h"
|
||||
#import "FLEXTableViewCell.h"
|
||||
#import "FLEXMultilineTableViewCell.h"
|
||||
#import "FLEXKeyValueTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXCodeFontCell.h"
|
||||
#import "Classes/Headers/FLEXSubtitleTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXMultilineTableViewCell.h"
|
||||
#import "Classes/Headers/FLEXKeyValueTableViewCell.h"
|
||||
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXObjectExplorerViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerViewController.h"
|
||||
|
||||
#import "FLEXObjectExplorer.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorer.h"
|
||||
|
||||
#import "FLEXShortcut.h"
|
||||
#import "FLEXShortcutsSection.h"
|
||||
#import "Classes/Headers/FLEXShortcut.h"
|
||||
#import "Classes/Headers/FLEXShortcutsSection.h"
|
||||
|
||||
#import "FLEXCollectionContentSection.h"
|
||||
#import "FLEXColorPreviewSection.h"
|
||||
#import "FLEXDefaultsContentSection.h"
|
||||
#import "FLEXMetadataSection.h"
|
||||
#import "FLEXMutableListSection.h"
|
||||
#import "FLEXObjectInfoSection.h"
|
||||
#import "Classes/Headers/FLEXCollectionContentSection.h"
|
||||
#import "Classes/Headers/FLEXColorPreviewSection.h"
|
||||
#import "Classes/Headers/FLEXDefaultsContentSection.h"
|
||||
#import "Classes/Headers/FLEXMetadataSection.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Headers/FLEXObjectInfoSection.h"
|
||||
|
||||
+17
-15
@@ -6,20 +6,22 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXObjcInternal.h"
|
||||
#import "FLEXRuntimeSafety.h"
|
||||
#import "FLEXBlockDescription.h"
|
||||
#import "FLEXTypeEncodingParser.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXObjcInternal.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXSwiftInternal.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXRuntimeSafety.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXBlockDescription.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXTypeEncodingParser.h"
|
||||
|
||||
#import "FLEXMirror.h"
|
||||
#import "FLEXProtocol.h"
|
||||
#import "FLEXProperty.h"
|
||||
#import "FLEXIvar.h"
|
||||
#import "FLEXMethodBase.h"
|
||||
#import "FLEXMethod.h"
|
||||
#import "FLEXPropertyAttributes.h"
|
||||
#import "FLEXRuntime+Compare.h"
|
||||
#import "FLEXRuntime+UIKitHelpers.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMirror.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXProtocol.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXProperty.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXIvar.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMethodBase.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMethod.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXPropertyAttributes.h"
|
||||
#import "Classes/Utility/Categories/FLEXRuntime+Compare.h"
|
||||
#import "Classes/Utility/Categories/FLEXRuntime+UIKitHelpers.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXMetadataExtras.h"
|
||||
|
||||
#import "FLEXProtocolBuilder.h"
|
||||
#import "FLEXClassBuilder.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXProtocolBuilder.h"
|
||||
#import "Classes/Utility/Runtime/Objc/Reflection/FLEXClassBuilder.h"
|
||||
|
||||
+14
-13
@@ -7,19 +7,20 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXManager.h"
|
||||
#import "FLEXManager+Extensibility.h"
|
||||
#import "FLEXManager+Networking.h"
|
||||
#import "Classes/Headers/FLEXManager.h"
|
||||
#import "Classes/Headers/FLEXManager+Extensibility.h"
|
||||
#import "Classes/Headers/FLEXManager+Networking.h"
|
||||
|
||||
#import "FLEXExplorerToolbar.h"
|
||||
#import "FLEXExplorerToolbarItem.h"
|
||||
#import "FLEXGlobalsEntry.h"
|
||||
#import "Classes/Headers/FLEXExplorerToolbar.h"
|
||||
#import "Classes/Headers/FLEXExplorerToolbarItem.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h"
|
||||
|
||||
#import "FLEX-Core.h"
|
||||
#import "FLEX-Runtime.h"
|
||||
#import "FLEX-Categories.h"
|
||||
#import "FLEX-ObjectExploring.h"
|
||||
#import "Classes/Headers/FLEX-Core.h"
|
||||
#import "Classes/Headers/FLEX-Runtime.h"
|
||||
#import "Classes/Headers/FLEX-Categories.h"
|
||||
#import "Classes/Headers/FLEX-ObjectExploring.h"
|
||||
|
||||
#import "FLEXMacros.h"
|
||||
#import "FLEXAlert.h"
|
||||
#import "FLEXResources.h"
|
||||
#import "Classes/Utility/FLEXMacros.h"
|
||||
#import "Classes/Utility/FLEXAlert.h"
|
||||
#import "Classes/Utility/FLEXResources.h"
|
||||
#import "Classes/Utility/FLEXHeapEnumerator.h"
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
// Copyright © 2015年 f. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXDBQueryRowCell.h"
|
||||
#import "FLEXMultiColumnTableView.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "UIFont+FLEX.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDBQueryRowCell.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXMultiColumnTableView.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UIFont+FLEX.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
|
||||
NSString * const kFLEXDBQueryRowCellReuse = @"kFLEXDBQueryRowCellReuse";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// which Flying Meat Inc. licenses this file to you.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "FLEXSQLResult.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLResult.h"
|
||||
|
||||
/// Conformers should automatically open and close the database
|
||||
@protocol FLEXDatabaseManager <NSObject>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "FLEXTableColumnHeader.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableColumnHeader.h"
|
||||
|
||||
@class FLEXMultiColumnTableView;
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXMultiColumnTableView.h"
|
||||
#import "FLEXDBQueryRowCell.h"
|
||||
#import "FLEXTableLeftCell.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXMultiColumnTableView.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDBQueryRowCell.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableLeftCell.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
|
||||
@interface FLEXMultiColumnTableView () <
|
||||
UITableViewDataSource, UITableViewDelegate,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "FLEXDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDatabaseManager.h"
|
||||
|
||||
@interface FLEXRealmDatabaseManager : NSObject <FLEXDatabaseManager>
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
// Copyright © 2016 Realm. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXRealmDatabaseManager.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "FLEXSQLResult.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLResult.h"
|
||||
|
||||
#if __has_include(<Realm/Realm.h>)
|
||||
#import <Realm/Realm.h>
|
||||
#import <Realm/RLMRealm_Dynamic.h>
|
||||
#else
|
||||
#import "FLEXRealmDefines.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDefines.h"
|
||||
#endif
|
||||
|
||||
@interface FLEXRealmDatabaseManager ()
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXSQLResult.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLResult.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
|
||||
@implementation FLEXSQLResult
|
||||
@synthesize keyedRows = _keyedRows;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
// which Flying Meat Inc. licenses this file to you.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "FLEXDatabaseManager.h"
|
||||
#import "FLEXSQLResult.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLResult.h"
|
||||
|
||||
@interface FLEXSQLiteDatabaseManager : NSObject <FLEXDatabaseManager>
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXSQLiteDatabaseManager.h"
|
||||
#import "FLEXManager.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "FLEXRuntimeConstants.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLiteDatabaseManager.h"
|
||||
#import "Classes/Headers/FLEXManager.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/Runtime/Objc/FLEXRuntimeConstants.h"
|
||||
#import <sqlite3.h>
|
||||
|
||||
#define kQuery(name, str) static NSString * const QUERY_##name = str
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2015年 f. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableColumnHeader.h"
|
||||
#import "FLEXColor.h"
|
||||
#import "UIFont+FLEX.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableColumnHeader.h"
|
||||
#import "Classes/Utility/FLEXColor.h"
|
||||
#import "Classes/Utility/Categories/UIFont+FLEX.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
static const CGFloat kMargin = 5;
|
||||
static const CGFloat kArrowWidth = 20;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "FLEXDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDatabaseManager.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableContentViewController.h"
|
||||
#import "FLEXTableRowDataViewController.h"
|
||||
#import "FLEXMultiColumnTableView.h"
|
||||
#import "FLEXWebViewController.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableRowDataViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXMultiColumnTableView.h"
|
||||
#import "Classes/GlobalStateExplorers/FLEXWebViewController.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
|
||||
@interface FLEXTableContentViewController () <
|
||||
FLEXMultiColumnTableViewDataSource, FLEXMultiColumnTableViewDelegate
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2015年 f. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableLeftCell.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableLeftCell.h"
|
||||
|
||||
@implementation FLEXTableLeftCell
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
|
||||
@interface FLEXTableListViewController : FLEXFilteringTableViewController
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
// Copyright © 2015年 Peng Tao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableListViewController.h"
|
||||
#import "FLEXDatabaseManager.h"
|
||||
#import "FLEXSQLiteDatabaseManager.h"
|
||||
#import "FLEXRealmDatabaseManager.h"
|
||||
#import "FLEXTableContentViewController.h"
|
||||
#import "FLEXMutableListSection.h"
|
||||
#import "NSArray+FLEX.h"
|
||||
#import "FLEXAlert.h"
|
||||
#import "FLEXMacros.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableListViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXSQLiteDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Utility/Categories/NSArray+FLEX.h"
|
||||
#import "Classes/Utility/FLEXAlert.h"
|
||||
#import "Classes/Utility/FLEXMacros.h"
|
||||
|
||||
@interface FLEXTableListViewController ()
|
||||
@property (nonatomic, readonly) id<FLEXDatabaseManager> dbm;
|
||||
@@ -93,16 +93,37 @@
|
||||
}
|
||||
|
||||
- (void)queryButtonPressed {
|
||||
[self showQueryInput:nil];
|
||||
}
|
||||
|
||||
- (void)showQueryInput:(NSString *)prefillQuery {
|
||||
FLEXSQLiteDatabaseManager *database = self.dbm;
|
||||
|
||||
[FLEXAlert makeAlert:^(FLEXAlert *make) {
|
||||
make.title(@"Execute an SQL query");
|
||||
make.textField(nil);
|
||||
make.configuredTextField(^(UITextField *textField) {
|
||||
textField.text = prefillQuery;
|
||||
});
|
||||
|
||||
make.button(@"Run").handler(^(NSArray<NSString *> *strings) {
|
||||
FLEXSQLResult *result = [database executeStatement:strings[0]];
|
||||
NSString *query = strings[0];
|
||||
FLEXSQLResult *result = [database executeStatement:query];
|
||||
|
||||
if (result.message) {
|
||||
[FLEXAlert showAlert:@"Message" message:result.message from:self];
|
||||
// Allow users to edit their last query if it had an error
|
||||
if ([result.message containsString:@"error"]) {
|
||||
[FLEXAlert makeAlert:^(FLEXAlert *make) {
|
||||
make.title(@"Error").message(result.message);
|
||||
make.button(@"Edit Query").preferred().handler(^(NSArray<NSString *> *_) {
|
||||
// Show query editor again with our last input
|
||||
[self showQueryInput:query];
|
||||
});
|
||||
|
||||
make.button(@"Cancel").cancelStyle();
|
||||
} showFrom:self];
|
||||
} else {
|
||||
[FLEXAlert showAlert:@"Message" message:result.message from:self];
|
||||
}
|
||||
} else {
|
||||
UIViewController *resultsScreen = [FLEXTableContentViewController
|
||||
columns:result.columns rows:result.rows
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Created by Chaoshuai Lu on 7/8/20.
|
||||
//
|
||||
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
|
||||
@interface FLEXTableRowDataViewController : FLEXFilteringTableViewController
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
// Created by Chaoshuai Lu on 7/8/20.
|
||||
//
|
||||
|
||||
#import "FLEXTableRowDataViewController.h"
|
||||
#import "FLEXMutableListSection.h"
|
||||
#import "FLEXAlert.h"
|
||||
#import "Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableRowDataViewController.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Utility/FLEXAlert.h"
|
||||
|
||||
@interface FLEXTableRowDataViewController ()
|
||||
@property (nonatomic) NSDictionary<NSString *, NSString *> *rowsByColumn;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// FLEXAPNSViewController.h
|
||||
// FLEX
|
||||
//
|
||||
// Created by Tanner Bennett on 6/28/22.
|
||||
// Copyright © 2022 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
|
||||
@interface FLEXAPNSViewController : FLEXFilteringTableViewController <FLEXGlobalsEntry>
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,372 @@
|
||||
//
|
||||
// FLEXAPNSViewController.m
|
||||
// FLEX
|
||||
//
|
||||
// Created by Tanner Bennett on 6/28/22.
|
||||
// Copyright © 2022 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Classes/GlobalStateExplorers/FLEXAPNSViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Headers/FLEXSingleRowSection.h"
|
||||
#import "Classes/Utility/Categories/NSUserDefaults+FLEX.h"
|
||||
#import "Classes/Utility/Categories/UIBarButtonItem+FLEX.h"
|
||||
#import "Classes/Utility/Categories/NSDateFormatter+FLEX.h"
|
||||
#import "Classes/Utility/FLEXResources.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Utility/Runtime/flex_fishhook.h"
|
||||
#import <dlfcn.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
|
||||
#define orig(method, ...) if (orig_##method) { orig_##method(__VA_ARGS__); }
|
||||
#define method_lookup(__selector, __cls, __return, ...) \
|
||||
([__cls instancesRespondToSelector:__selector] ? \
|
||||
(__return(*)(__VA_ARGS__))class_getMethodImplementation(__cls, __selector) : nil)
|
||||
|
||||
@interface FLEXAPNSViewController ()
|
||||
@property (nonatomic, readonly, class) Class appDelegateClass;
|
||||
@property (nonatomic, class) NSData *deviceToken;
|
||||
@property (nonatomic, class) NSError *registrationError;
|
||||
@property (nonatomic, readonly, class) NSString *deviceTokenString;
|
||||
@property (nonatomic, readonly, class) NSMutableArray<NSDictionary *> *remoteNotifications;
|
||||
@property (nonatomic, readonly, class) NSMutableArray<UNNotification *> *userNotifications API_AVAILABLE(ios(10.0));
|
||||
|
||||
@property (nonatomic) FLEXSingleRowSection *deviceToken;
|
||||
@property (nonatomic) FLEXMutableListSection<NSDictionary *> *remoteNotifications;
|
||||
@property (nonatomic) FLEXMutableListSection<UNNotification *> *userNotifications API_AVAILABLE(ios(10.0));
|
||||
@end
|
||||
|
||||
@implementation FLEXAPNSViewController
|
||||
|
||||
#pragma mark Swizzles
|
||||
|
||||
/// Hook User Notifications related methods on the app delegate
|
||||
/// and UNUserNotificationCenter delegate classes
|
||||
+ (void)load { FLEX_EXIT_IF_NO_CTORS()
|
||||
if (!NSUserDefaults.standardUserDefaults.flex_enableAPNSCapture) {
|
||||
return;
|
||||
}
|
||||
|
||||
//──────────────────────//
|
||||
// App Delegate //
|
||||
//──────────────────────//
|
||||
|
||||
// Hook UIApplication to intercept app delegate
|
||||
Class uiapp = UIApplication.self;
|
||||
auto orig_uiapp_setDelegate = (void(*)(id, SEL, id))class_getMethodImplementation(
|
||||
uiapp, @selector(setDelegate:)
|
||||
);
|
||||
|
||||
IMP uiapp_setDelegate = imp_implementationWithBlock(^(id _, id delegate) {
|
||||
[self hookAppDelegateClass:[delegate class]];
|
||||
orig_uiapp_setDelegate(_, @selector(setDelegate:), delegate);
|
||||
});
|
||||
|
||||
class_replaceMethod(
|
||||
uiapp,
|
||||
@selector(setDelegate:),
|
||||
uiapp_setDelegate,
|
||||
"v@:@"
|
||||
);
|
||||
|
||||
//───────────────────────────────────────────//
|
||||
// UNUserNotificationCenter Delegate //
|
||||
//───────────────────────────────────────────//
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
Class unusernc = UNUserNotificationCenter.self;
|
||||
auto orig_unusernc_setDelegate = (void(*)(id, SEL, id))class_getMethodImplementation(
|
||||
unusernc, @selector(setDelegate:)
|
||||
);
|
||||
|
||||
IMP unusernc_setDelegate = imp_implementationWithBlock(^(id _, id delegate) {
|
||||
[self hookUNUserNotificationCenterDelegateClass:[delegate class]];
|
||||
orig_unusernc_setDelegate(_, @selector(setDelegate:), delegate);
|
||||
});
|
||||
|
||||
class_replaceMethod(
|
||||
unusernc,
|
||||
@selector(setDelegate:),
|
||||
unusernc_setDelegate,
|
||||
"v@:@"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)hookAppDelegateClass:(Class)appDelegate {
|
||||
// Abort if we already hooked something
|
||||
if (_appDelegateClass) {
|
||||
return;
|
||||
}
|
||||
|
||||
_appDelegateClass = appDelegate;
|
||||
|
||||
// Better documentation for what's happening is in hookUNUserNotificationCenterDelegateClass: below
|
||||
|
||||
auto types_didRegisterForRemoteNotificationsWithDeviceToken = "v@:@@";
|
||||
auto types_didFailToRegisterForRemoteNotificationsWithError = "v@:@@";
|
||||
auto types_didReceiveRemoteNotification = "v@:@@@?";
|
||||
|
||||
auto sel_didRegisterForRemoteNotifications = @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:);
|
||||
auto sel_didFailToRegisterForRemoteNotifs = @selector(application:didFailToRegisterForRemoteNotificationsWithError:);
|
||||
auto sel_didReceiveRemoteNotification = @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:);
|
||||
|
||||
auto orig_didRegisterForRemoteNotificationsWithDeviceToken = method_lookup(
|
||||
sel_didRegisterForRemoteNotifications, appDelegate, void, id, SEL, id, id);
|
||||
auto orig_didFailToRegisterForRemoteNotificationsWithError = method_lookup(
|
||||
sel_didFailToRegisterForRemoteNotifs, appDelegate, void, id, SEL, id, id);
|
||||
auto orig_didReceiveRemoteNotification = method_lookup(
|
||||
sel_didReceiveRemoteNotification, appDelegate, void, id, SEL, id, id, id);
|
||||
|
||||
IMP didRegisterForRemoteNotificationsWithDeviceToken = imp_implementationWithBlock(^(id _, id app, NSData *token) {
|
||||
self.deviceToken = token;
|
||||
orig(didRegisterForRemoteNotificationsWithDeviceToken, _, nil, app, token);
|
||||
});
|
||||
IMP didFailToRegisterForRemoteNotificationsWithError = imp_implementationWithBlock(^(id _, id app, NSError *error) {
|
||||
self.registrationError = error;
|
||||
orig(didFailToRegisterForRemoteNotificationsWithError, _, nil, app, error);
|
||||
});
|
||||
IMP didReceiveRemoteNotification = imp_implementationWithBlock(^(id _, id app, NSDictionary *payload, id handler) {
|
||||
// TODO: notify when new notifications are added
|
||||
[self.remoteNotifications addObject:payload];
|
||||
orig(didReceiveRemoteNotification, _, nil, app, payload, handler);
|
||||
});
|
||||
|
||||
class_replaceMethod(
|
||||
appDelegate,
|
||||
sel_didRegisterForRemoteNotifications,
|
||||
didRegisterForRemoteNotificationsWithDeviceToken,
|
||||
types_didRegisterForRemoteNotificationsWithDeviceToken
|
||||
);
|
||||
class_replaceMethod(
|
||||
appDelegate,
|
||||
sel_didFailToRegisterForRemoteNotifs,
|
||||
didFailToRegisterForRemoteNotificationsWithError,
|
||||
types_didFailToRegisterForRemoteNotificationsWithError
|
||||
);
|
||||
class_replaceMethod(
|
||||
appDelegate,
|
||||
sel_didReceiveRemoteNotification,
|
||||
didReceiveRemoteNotification,
|
||||
types_didReceiveRemoteNotification
|
||||
);
|
||||
}
|
||||
|
||||
+ (void)hookUNUserNotificationCenterDelegateClass:(Class)delegate API_AVAILABLE(ios(10.0)) {
|
||||
// Selector
|
||||
auto sel_didReceiveNotification =
|
||||
@selector(userNotificationCenter:willPresentNotification:withCompletionHandler:);
|
||||
// Original implementation (or nil if unimplemented)
|
||||
auto orig_didReceiveNotification = method_lookup(
|
||||
sel_didReceiveNotification, delegate, void, id, SEL, id, id, id);
|
||||
// Our hook (ignores self and other unneeded parameters)
|
||||
IMP didReceiveNotification = imp_implementationWithBlock(^(id _, id __, UNNotification *notification, id ___) {
|
||||
[self.userNotifications addObject:notification];
|
||||
// This macro is a no-op if there is no original implementation
|
||||
orig(didReceiveNotification, _, nil, __, notification, ___);
|
||||
});
|
||||
|
||||
// Set the hook
|
||||
class_replaceMethod(
|
||||
delegate,
|
||||
sel_didReceiveNotification,
|
||||
didReceiveNotification,
|
||||
"v@:@@@?"
|
||||
);
|
||||
}
|
||||
|
||||
#pragma mark Class Properties
|
||||
|
||||
static Class _appDelegateClass = nil;
|
||||
+ (Class)appDelegateClass {
|
||||
return _appDelegateClass;
|
||||
}
|
||||
|
||||
static NSData *_apnsDeviceToken = nil;
|
||||
+ (NSData *)deviceToken {
|
||||
return _apnsDeviceToken;
|
||||
}
|
||||
|
||||
+ (void)setDeviceToken:(NSData *)deviceToken {
|
||||
_apnsDeviceToken = deviceToken;
|
||||
}
|
||||
|
||||
+ (NSString *)deviceTokenString {
|
||||
static NSString *_deviceTokenString = nil;
|
||||
|
||||
if (!_deviceTokenString && self.deviceToken) {
|
||||
NSData *token = self.deviceToken;
|
||||
NSUInteger capacity = token.length * 2;
|
||||
NSMutableString *tokenString = [NSMutableString stringWithCapacity:capacity];
|
||||
|
||||
const UInt8 *tokenData = token.bytes;
|
||||
for (NSUInteger idx = 0; idx < token.length; ++idx) {
|
||||
[tokenString appendFormat:@"%02X", (int)tokenData[idx]];
|
||||
}
|
||||
|
||||
_deviceTokenString = tokenString;
|
||||
}
|
||||
|
||||
return _deviceTokenString;
|
||||
}
|
||||
|
||||
static NSError *_apnsRegistrationError = nil;
|
||||
+ (NSError *)registrationError {
|
||||
return _apnsRegistrationError;
|
||||
}
|
||||
|
||||
+ (void)setRegistrationError:(NSError *)error {
|
||||
_apnsRegistrationError = error;
|
||||
}
|
||||
|
||||
+ (NSMutableArray<NSDictionary *> *)userNotifications {
|
||||
static NSMutableArray *_userNotifications = nil;
|
||||
if (!_userNotifications) {
|
||||
_userNotifications = [NSMutableArray new];
|
||||
}
|
||||
|
||||
return _userNotifications;
|
||||
}
|
||||
|
||||
+ (NSMutableArray<NSDictionary *> *)remoteNotifications {
|
||||
static NSMutableArray *_remoteNotifications = nil;
|
||||
if (!_remoteNotifications) {
|
||||
_remoteNotifications = [NSMutableArray new];
|
||||
}
|
||||
|
||||
return _remoteNotifications;
|
||||
}
|
||||
|
||||
#pragma mark Instance stuff
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.title = @"Push Notifications";
|
||||
|
||||
self.refreshControl = [UIRefreshControl new];
|
||||
[self.refreshControl addTarget:self action:@selector(reloadData) forControlEvents:UIControlEventValueChanged];
|
||||
|
||||
[self addToolbarItems:@[
|
||||
[UIBarButtonItem
|
||||
flex_itemWithImage:FLEXResources.gearIcon
|
||||
target:self
|
||||
action:@selector(settingsButtonTapped)
|
||||
],
|
||||
]];
|
||||
}
|
||||
|
||||
- (NSArray<FLEXTableViewSection *> *)makeSections {
|
||||
self.deviceToken = [FLEXSingleRowSection title:@"APNS Device Token" reuse:nil cell:^(UITableViewCell *cell) {
|
||||
NSString *tokenString = FLEXAPNSViewController.deviceTokenString;
|
||||
if (tokenString) {
|
||||
cell.textLabel.text = tokenString;
|
||||
cell.textLabel.numberOfLines = 0;
|
||||
}
|
||||
else if (!NSUserDefaults.standardUserDefaults.flex_enableAPNSCapture) {
|
||||
cell.textLabel.text = @"APNS capture disabled";
|
||||
}
|
||||
else {
|
||||
cell.textLabel.text = @"Not yet registered";
|
||||
}
|
||||
}];
|
||||
self.deviceToken.selectionAction = ^(UIViewController *host) {
|
||||
UIPasteboard.generalPasteboard.string = FLEXAPNSViewController.deviceTokenString;
|
||||
[FLEXAlert showQuickAlert:@"Copied to Clipboard" from:host];
|
||||
};
|
||||
|
||||
// Remote Notifications //
|
||||
|
||||
self.remoteNotifications = [FLEXMutableListSection list:FLEXAPNSViewController.remoteNotifications
|
||||
cellConfiguration:^(UITableViewCell *cell, NSDictionary *notif, NSInteger row) {
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
// TODO: date received
|
||||
cell.detailTextLabel.text = [FLEXRuntimeUtility summaryForObject:notif];
|
||||
}
|
||||
filterMatcher:^BOOL(NSString *filterText, NSDictionary *notif) {
|
||||
return [notif.description localizedCaseInsensitiveContainsString:filterText];
|
||||
}
|
||||
];
|
||||
|
||||
self.remoteNotifications.customTitle = @"Remote Notifications";
|
||||
self.remoteNotifications.selectionHandler = ^(UIViewController *host, NSDictionary *notif) {
|
||||
[host.navigationController pushViewController:[
|
||||
FLEXObjectExplorerFactory explorerViewControllerForObject:notif
|
||||
] animated:YES];
|
||||
};
|
||||
|
||||
// User Notifications //
|
||||
|
||||
if (@available(iOS 10.0, *)) {
|
||||
self.userNotifications = [FLEXMutableListSection list:FLEXAPNSViewController.userNotifications
|
||||
cellConfiguration:^(UITableViewCell *cell, UNNotification *notif, NSInteger row) {
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
|
||||
// Subtitle is 'subtitle \n date'
|
||||
NSString *dateString = [NSDateFormatter flex_stringFrom:notif.date format:FLEXDateFormatPreciseClock];
|
||||
NSString *subtitle = notif.request.content.subtitle;
|
||||
subtitle = subtitle ? [NSString stringWithFormat:@"%@\n%@", subtitle, dateString] : dateString;
|
||||
|
||||
cell.textLabel.text = notif.request.content.title;
|
||||
cell.detailTextLabel.text = subtitle;
|
||||
}
|
||||
filterMatcher:^BOOL(NSString *filterText, NSDictionary *notif) {
|
||||
return [notif.description localizedCaseInsensitiveContainsString:filterText];
|
||||
}
|
||||
];
|
||||
|
||||
self.userNotifications.customTitle = @"Push Notifications";
|
||||
self.userNotifications.selectionHandler = ^(UIViewController *host, UNNotification *notif) {
|
||||
[host.navigationController pushViewController:[
|
||||
FLEXObjectExplorerFactory explorerViewControllerForObject:notif.request
|
||||
] animated:YES];
|
||||
};
|
||||
|
||||
return @[self.deviceToken, self.remoteNotifications, self.userNotifications];
|
||||
}
|
||||
else {
|
||||
return @[self.deviceToken, self.remoteNotifications];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reloadData {
|
||||
[self.refreshControl endRefreshing];
|
||||
|
||||
self.remoteNotifications.customTitle = [NSString stringWithFormat:
|
||||
@"%@ notifications", @(self.remoteNotifications.filteredList.count)
|
||||
];
|
||||
[super reloadData];
|
||||
}
|
||||
|
||||
- (void)settingsButtonTapped {
|
||||
NSUserDefaults *defaults = NSUserDefaults.standardUserDefaults;
|
||||
BOOL enabled = defaults.flex_enableAPNSCapture;
|
||||
|
||||
NSString *apnsToggle = enabled ? @"Disable Capture" : @"Enable Capture";
|
||||
|
||||
[FLEXAlert makeAlert:^(FLEXAlert *make) {
|
||||
make.title(@"Settings")
|
||||
.message(@"Enable or disable the capture of push notifications.\n\n")
|
||||
.message(@"This will hook UIApplicationMain on launch until it is disabled, ")
|
||||
.message(@"and swizzle some app delegate methods. Restart the app for changes to take effect.");
|
||||
|
||||
make.button(apnsToggle).destructiveStyle().handler(^(NSArray<NSString *> *strings) {
|
||||
[defaults flex_toggleBoolForKey:kFLEXDefaultsAPNSCaptureEnabledKey];
|
||||
});
|
||||
make.button(@"Dismiss").cancelStyle();
|
||||
} showFrom:self];
|
||||
}
|
||||
|
||||
#pragma mark - FLEXGlobalsEntry
|
||||
|
||||
+ (NSString *)globalsEntryTitle:(FLEXGlobalsRow)row {
|
||||
return @"📌 Push Notifications";
|
||||
}
|
||||
|
||||
+ (UIViewController *)globalsEntryViewController:(FLEXGlobalsRow)row {
|
||||
return [self new];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXGlobalsEntry.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h"
|
||||
|
||||
@interface FLEXAddressExplorerCoordinator : NSObject <FLEXGlobalsEntry>
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXAddressExplorerCoordinator.h"
|
||||
#import "FLEXGlobalsViewController.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXObjectExplorerViewController.h"
|
||||
#import "FLEXRuntimeUtility.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/GlobalStateExplorers/FLEXAddressExplorerCoordinator.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerViewController.h"
|
||||
#import "Classes/Utility/Runtime/FLEXRuntimeUtility.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface UITableViewController (FLEXAddressExploration)
|
||||
- (void)deselectSelectedRow;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXGlobalsEntry.h"
|
||||
#import "FLEXFilteringTableViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h"
|
||||
#import "Classes/Headers/FLEXFilteringTableViewController.h"
|
||||
|
||||
@interface FLEXCookiesViewController : FLEXFilteringTableViewController <FLEXGlobalsEntry>
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
// Copyright © 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXCookiesViewController.h"
|
||||
#import "FLEXObjectExplorerFactory.h"
|
||||
#import "FLEXMutableListSection.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "Classes/GlobalStateExplorers/FLEXCookiesViewController.h"
|
||||
#import "Classes/Headers/FLEXObjectExplorerFactory.h"
|
||||
#import "Classes/Headers/FLEXMutableListSection.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
|
||||
@interface FLEXCookiesViewController ()
|
||||
@property (nonatomic, readonly) FLEXMutableListSection<NSHTTPCookie *> *cookies;
|
||||
@@ -26,6 +26,14 @@
|
||||
self.title = @"Cookies";
|
||||
}
|
||||
|
||||
- (NSString *)headerTitle {
|
||||
return self.cookies.title;
|
||||
}
|
||||
|
||||
- (void)setHeaderTitle:(NSString *)headerTitle {
|
||||
self.cookies.customTitle = headerTitle;
|
||||
}
|
||||
|
||||
- (NSArray<FLEXTableViewSection *> *)makeSections {
|
||||
NSSortDescriptor *nameSortDescriptor = [[NSSortDescriptor alloc]
|
||||
initWithKey:@"name" ascending:YES selector:@selector(caseInsensitiveCompare:)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXTableViewController.h"
|
||||
#import "FLEXGlobalsEntry.h"
|
||||
#import "Classes/Headers/FLEXTableViewController.h"
|
||||
#import "Classes/GlobalStateExplorers/Globals/FLEXGlobalsEntry.h"
|
||||
|
||||
@interface FLEXLiveObjectsController : FLEXTableViewController <FLEXGlobalsEntry>
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
// Copyright (c) 2020 FLEX Team. All rights reserved.
|
||||
//
|
||||
|
||||
#import "FLEXLiveObjectsController.h"
|
||||
#import "FLEXHeapEnumerator.h"
|
||||
#import "FLEXObjectListViewController.h"
|
||||
#import "FLEXUtility.h"
|
||||
#import "FLEXScopeCarousel.h"
|
||||
#import "FLEXTableView.h"
|
||||
#import "Classes/GlobalStateExplorers/FLEXLiveObjectsController.h"
|
||||
#import "Classes/Utility/FLEXHeapEnumerator.h"
|
||||
#import "Classes/GlobalStateExplorers/FLEXObjectListViewController.h"
|
||||
#import "Classes/Utility/FLEXUtility.h"
|
||||
#import "Classes/Core/Views/Carousel/FLEXScopeCarousel.h"
|
||||
#import "Classes/Headers/FLEXTableView.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
static const NSInteger kFLEXLiveObjectsSortAlphabeticallyIndex = 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user