HyperioniOSExtension
Before Using, Pay Attention To The Point
HYPEnvironmentSelector
Cocoapods Import
in Podfile
:
pod 'HyperioniOSExtension/EnvironmentSelector', :configurations => ['Debug'] # Not Depend HyperioniOS, iOS Version >= 7.0
or
pod 'HyperioniOSExtension/EnvironmentSelector-Plugin', :configurations => ['Debug'] # Depend HyperioniOS, iOS Version >= 9.0
Use
// If Use Not Depend HyperioniOS Version, Following `HYPEnvironmentSelectorPlugin.manager` change to `[HYPEnvironmentSelectorManager sharedManager]`
// Set the environment variable of the environment selection page.
// The element of `environmentItems` must conform to the `HYPEnvironmentItemProtocol` protocol.
HYPEnvironmentSelectorPlugin.manager.environmentItems = @[envItem1, envItem2, envItem3];
// Actively fill in the template for the environment variable
HYPEnvironmentSelectorPlugin.manager.customEnvironmentItemTemplate = envItem1;
// Set callback after selecting environment
HYPEnvironmentSelectorPlugin.manager.environmentSelectedBlock = ^(NSObject<HYPEnvironmentItemProtocol> * _Nullable obj) {
// Click on the environment setting and return the corresponding obj.
};
// Whether to show in the column to the right of `HyperioniOS`
HYPEnvironmentSelectorPlugin.manager.isShowInSidebarList = YES/NO;
// Whether to allow editing with the element of `environmentItems` as a template
HYPEnvironmentSelectorPlugin.manager.isCanEditItemFromListItem = YES/NO;
// Actively pop up the environment selection page
[HYPEnvironmentSelectorPlugin.manager showEnvironmentSelectorWindowAnimated:YES isCanCancel:YES completionBlock:^{
// Callback after popup
}];
// Actively hide the environment selection page
[HYPEnvironmentSelectorPlugin.manager hideEnvironmentSelectorWindowAnimated:YES completionBlock:^{
// The callback after the hide
}];
HYPEnvironmentItemProtocol object note
ObjC
object definition notes:
- Must follow the
HYPEnvironmentItemProtocol
protocol - Must include
name
property
@interface MyEnvItem : NSObject <HYPEnvironmentItemProtocol>
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *otherVariable;
@end
@implementation MyEnvItem
@end
Swift
object definition notes:
- Must inherit from
NSObject
, in line withHYPEnvironmentItemProtocol
protocol - When the class definition must dynamic properties (
Swift 4+
definition plus@objcMembers
) - Must contain the
var name: String?
variable - Must implement
required override init() { super.init() }
method - Use the variable
var
for all attributes. Do not use the constantlet
- All attribute types are
String?
(Optional<String>
)
@objcMembers
class MyEnvItem: NSObject, HYPEnvironmentItemProtocol {
var name: String?
var otherVariable: String?
required override init() {
super.init()
}
}
HYPFPSMonitor
Cocoapods Import
in Podfile
:
pod 'HyperioniOSExtension/FPSMonitor', :configurations => ['Debug'] # Not Depend HyperioniOS, iOS Version >= 6.0
or
pod 'HyperioniOSExtension/FPSMonitor-Plugin', :configurations => ['Debug'] # Depend HyperioniOS, iOS Version >= 9.0
Use
// If Use Not Depend HyperioniOS Version, Following `HYPFPSMonitorPlugin.manager` change to `[HYPFPSMonitorManager sharedManager]`
// Set whether touch/drag FPS monitoring View is allowed
HYPFPSMonitorPlugin.manager.isCanTouchFPSView = YES/NO;
// Actively display FPS monitoring View
[HYPFPSMonitorPlugin.manager showFPSMonitor];
// Actively hide FPS monitoring View
[HYPFPSMonitorPlugin.manager hideFPSMonitor];
HYPUIMainThreadChecker
Cocoapods Import
in Podfile
:
pod 'HyperioniOSExtension/HYPUIMainThreadChecker', :configurations => ['Debug'] # Not Depend HyperioniOS, iOS Version >= 5.0
or
pod 'HyperioniOSExtension/HYPUIMainThreadChecker-Plugin', :configurations => ['Debug'] # Depend HyperioniOS, iOS Version >= 9.0
Use
// If Use Not Depend HyperioniOS Version, Following `HYPUIMainThreadCheckerPlugin.manager` change to `[HYPUIMainThreadCheckerManager sharedManager]`
// Turns on UI operation main thread (main_queue) monitoring
[HYPUIMainThreadCheckerPlugin.manager open];
// Turns off UI operation main thread (main_queue) monitoring
[HYPUIMainThreadCheckerPlugin.manager close];