Skip to content

Commit 0ab3f93

Browse files
guangyaoguangyao
authored andcommitted
优化点击电话拨号慢的问题
1 parent 1761553 commit 0ab3f93

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ios/RCTAuroraIMUI/DWCustomView/InputView/DWRecordButton.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ @interface DWRecordButton (){
2424

2525
@implementation DWRecordButton
2626

27+
- (void)dealloc{
28+
[self removeGestureRecognizer:_btnTap];
29+
}
30+
2731
- (instancetype)init
2832
{
2933
self = [super init];

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUITextMessageCell.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,14 @@ open class IMUITextMessageCell: IMUIBaseMessageCell {
7474
}
7575
self.textMessageLable.numBlock = {(strNum:String)->() in
7676
print("numBlock:-----------\(strNum)")
77-
let strNUm = "telprompt://"+strNum
78-
UIApplication.shared.openURL(URL.init(string: strNUm)!)
77+
let strNUm = URL.init(string: ("telprompt://"+strNum))
78+
if #available(iOS 10.0, *) {
79+
UIApplication.shared.open(strNUm!, options: [:], completionHandler: nil)
80+
} else {
81+
UIApplication.shared.openURL(strNUm!)
82+
}
83+
84+
7985
}
8086

8187

0 commit comments

Comments
 (0)