Skip to content

Commit 4a35778

Browse files
committed
适配IOS10,权限、NavigationBar
1 parent 77ad31c commit 4a35778

File tree

6 files changed

+74
-8
lines changed

6 files changed

+74
-8
lines changed

LLWeChat.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@
21012101
"$(PROJECT_DIR)/AMap",
21022102
);
21032103
INFOPLIST_FILE = LLWeChat/Info.plist;
2104-
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
2104+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
21052105
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
21062106
LIBRARY_SEARCH_PATHS = (
21072107
"$(inherited)",
@@ -2129,7 +2129,7 @@
21292129
"$(PROJECT_DIR)/AMap",
21302130
);
21312131
INFOPLIST_FILE = LLWeChat/Info.plist;
2132-
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
2132+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
21332133
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
21342134
LIBRARY_SEARCH_PATHS = (
21352135
"$(inherited)",

LLWeChat/Client/Chat/LLChatViewController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ - (void)viewWillAppear:(BOOL)animated {
173173

174174
[LLChatManager sharedManager].messageListDelegate = self;
175175
navigationBarTranslucent = self.navigationController.navigationBar.translucent;
176-
self.navigationController.navigationBar.translucent = YES;
176+
self.navigationController.navigationBar.translucent = NO;
177177

178178
UIView *blackView = [self.view viewWithTag:BLACK_BAR_VIEW_TAG];
179179
if (self.navigationController.navigationBar.subviews[0].alpha == 0 && !blackView) {
180-
blackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 64)];
180+
blackView = [[UIView alloc] initWithFrame:CGRectMake(0, -64, SCREEN_WIDTH, 64)];
181181
blackView.backgroundColor = [UIColor blackColor];
182182
[self.view addSubview:blackView];
183183
}

LLWeChat/General/ImagePicker/View/LLPhotoToolbar.m

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import "LLPhotoToolbar.h"
1010
#import "LLImageNumberView.h"
1111
#import "LLImagePickerConfig.h"
12+
#import "LLUtils.h"
1213

1314
@interface LLPhotoToolbar ()
1415

@@ -38,7 +39,12 @@ - (instancetype)initWithStyle:(LLPhotoToolbarStyle)style {
3839
}else {
3940
// self.toolBar.barStyle = UIBarStyleBlack;
4041
self.toolBar.barTintColor = [UIColor colorWithRed:19/255.0 green:19/255.0 blue:20/255.0 alpha:1];
41-
self.toolBar.subviews[0].alpha = 0.6;
42+
if ([LLUtils systemVersion] < 10.0) {
43+
self.toolBar.subviews[0].alpha = 0.6;
44+
}else {
45+
//IOS10 UIToolBar显示列表结构发生改变
46+
self.toolBar.alpha = 0.6;
47+
}
4248
}
4349

4450

LLWeChat/Info.plist

+21-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,28 @@
4444
<key>NSAllowsArbitraryLoads</key>
4545
<true/>
4646
</dict>
47+
<key>NSBluetoothPeripheralUsageDescription</key>
48+
<string>Allow WeChat Use Bluetooth Peripheral.</string>
49+
<key>NSCameraUsageDescription</key>
50+
<string>Use your Camera to record video, using VoIP features.</string>
51+
<key>NSContactsUsageDescription</key>
52+
<string>Allow WeChat Use your Contact.</string>
53+
<key>NSHealthShareUsageDescription</key>
54+
<string>Allow WeChat Use Health Share.</string>
55+
<key>NSHealthUpdateUsageDescription</key>
56+
<string>Allow WeChat Use Health Update.</string>
57+
<key>NSLocationAlwaysUsageDescription</key>
58+
<string>Allow WeChat Use your Location always.</string>
4759
<key>NSLocationUsageDescription</key>
48-
<string>OK</string>
60+
<string>Allow WeChat Use your Location.</string>
61+
<key>NSLocationWhenInUseUsageDescription</key>
62+
<string>Allow WeChat Use your Location when in use.</string>
63+
<key>NSMicrophoneUsageDescription</key>
64+
<string>Use your Microphone to record voice messages, using VoIP features.</string>
65+
<key>NSMotionUsageDescription</key>
66+
<string>Allow WeChat Use Motion.</string>
67+
<key>NSPhotoLibraryUsageDescription</key>
68+
<string>Allow WeChat Use your PhotoLibrary.</string>
4969
<key>UIBackgroundModes</key>
5070
<array>
5171
<string>audio</string>

LLWeChat/en.lproj/InfoPlist.strings

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,24 @@
77
*/
88

99
"CFBundleDisplayName" = "LLWeChat";
10-
"NSLocationWhenInUseUsageDescription" = "请点击“允许”以允许访问。\n若不允许,你将无法发送地理位置。";
10+
11+
"NSCalendarsUsageDescription" = "If not allowed, WeChat will be unable to access your phone calendar and add schedule messages to your calendar.";
12+
13+
"NSSiriUsageDescription" = "If not allowed, you will be unable to send WeChat messages or make voice/video calls via Siri.";
14+
15+
"NSMicrophoneUsageDescription" = "If not allowed, you will be unable to send audio messages or make a voice/video calls within WeChat.";
16+
17+
"NSPhotoLibraryUsageDescription" = "If not allowed, you will be unable to send photos from Camera Roll to friends on WeChat.";
18+
19+
"NSCameraUsageDescription" = "If not allowed, you will be unable to take photos and Sight, use video calls, or scan QR codes.";
20+
21+
22+
"NSBluetoothPeripheralUsageDescription" = "If not allowed, WeChat will be unable to access your Bluetooth devices.";
23+
24+
"NSLocationUsageDescription" = "If not allowed, you will be unable to share your location within chats or use location-based services like Shake and People Nearby";
25+
26+
"NSContactsUsageDescription" = "If not allowed, WeChat cannot help you find mobile contacts who also use WeChat. Your mobile contacts data will be safely encrypted before being matched.";
27+
28+
"NSLocationAlwaysUsageDescription" = "If not allowed, you will be unable to use some WeChat features via Apple Watch.";
29+
30+
"NSLocationWhenInUseUsageDescription" = "If not allowed, you will be unable to share your location within chats or use location-based services like Shake and People Nearby.";

LLWeChat/zh-Hans.lproj/InfoPlist.strings

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,24 @@
77
*/
88

99
"CFBundleDisplayName" = "LL微信";
10-
"NSLocationWhenInUseUsageDescription" = "请点击“允许”以允许访问。\n若不允许,你将无法发送地理位置。";
10+
11+
"NSCalendarsUsageDescription" = "If not allowed, WeChat will be unable to access your phone calendar and add schedule messages to your calendar.";
12+
13+
"NSSiriUsageDescription" = "If not allowed, you will be unable to send WeChat messages or make voice/video calls via Siri.";
14+
15+
"NSMicrophoneUsageDescription" = "如果不允许,你将无法使用微信发送语音消息、拨打语音/视频电话。";
16+
17+
"NSPhotoLibraryUsageDescription" = "如果不允许,你将无法发送照片给你的微信好友。";
18+
19+
"NSCameraUsageDescription" = "如果不允许,你将无法使用微信拍照、拍摄小视频、视频通话和扫描二维码。";
20+
21+
"NSBluetoothPeripheralUsageDescription" = "If not allowed, WeChat will be unable to access your Bluetooth devices.";
22+
23+
"NSLocationUsageDescription" = "如果不允许,你将无法在聊天中分享你的位置,也无法使用摇一摇、附近的人等功能。";
24+
25+
"NSContactsUsageDescription" = "If not allowed, WeChat cannot help you find mobile contacts who also use WeChat. Your mobile contacts data will be safely encrypted before being matched.";
26+
27+
"NSLocationAlwaysUsageDescription" = "如果不允许,你将无法在Apple Watch中使用一些微信功能。";
28+
29+
"NSLocationWhenInUseUsageDescription" = "如果不允许,你将无法在聊天中分享你的位置,也无法使用摇一摇、附近的人等功能。";
30+

0 commit comments

Comments
 (0)