mirror of
https://github.com/DKJone/DKWechatHelper.git
synced 2026-07-29 06:12:07 +08:00
1.1.0 适配微信8.0.38 xcode 12 ,ios 16
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#import "NSArray+Utils.h"
|
||||
#import "DKLaunchHelper.h"
|
||||
#import "DKLaunchViewController.h"
|
||||
#import <CoreMotion/CoreMotion.h>
|
||||
//MARK: - quick objc finds
|
||||
#define FUiUtil objc_getClass("UiUtil")
|
||||
#define FMMUICommonUtil objc_getClass("MMUICommonUtil")
|
||||
@@ -82,7 +83,9 @@ typedef void(^BtnBlock)(UIButton *sender);
|
||||
+ (WCUIAlertView *)showAlertWithTitle:(NSString *)title message:(NSString *)msg btnTitle:(NSString *)btn1 handler:(BtnBlock)handler1 btnTitle:(NSString *)btn2 handler:(BtnBlock)handler2;
|
||||
+ (void)sendMsg:(NSString *)msg toContactUsrName:(NSString *)userName;
|
||||
+ (void)sendMsg:(NSString *)msg toContactUsrName:(NSString *)userName uiMsgType:(int)type;
|
||||
+(CMAccelerometerHandler)startAccelerometerUpdatesToQueue:(id)queue withHandler:(CMAccelerometerHandler )handle;
|
||||
|
||||
+ (void)Log:(NSString*)msg;
|
||||
@end
|
||||
|
||||
@interface WeChatRedEnvelopParam : NSObject
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
+ (UIColor *)backgroundColor{
|
||||
return [DKHelper tableManageWithViewFrame].tableView.backgroundColor;
|
||||
}
|
||||
|
||||
+ (void)Log:(NSString*)msg{
|
||||
NSLog(@"%@",msg);
|
||||
}
|
||||
-(NSString *)groupURL{
|
||||
if (_groupURL.length) {
|
||||
return _groupURL;
|
||||
@@ -265,6 +267,21 @@ ___addComment:
|
||||
}];
|
||||
}
|
||||
|
||||
/// 加速摇一摇,增加次数
|
||||
+(CMAccelerometerHandler)startAccelerometerUpdatesToQueue:(id)queue withHandler:(CMAccelerometerHandler )handle{
|
||||
|
||||
CMAccelerometerHandler newhandle = ^(CMAccelerometerData * _Nullable accelerometerData, NSError * _Nullable error) {
|
||||
|
||||
for (int i = 0; i<10; i++) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * i * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
handle(accelerometerData,error);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return newhandle;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -449,5 +466,4 @@ ___addComment:
|
||||
- (BOOL)serialQueueIsEmpty {
|
||||
return [self.serialTaskQueue operations].count == 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user