Commit 13a132fa authored by yuzheng.tz's avatar yuzheng.tz

如果有就取localizedInfoDictionary

parent 83892476
......@@ -156,8 +156,12 @@
_tipLabel.numberOfLines = 0;
_tipLabel.font = [UIFont systemFontOfSize:16];
_tipLabel.textColor = [UIColor blackColor];
NSString *appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleDisplayName"];
if (!appName) appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleName"];
NSDictionary *infoDict = [NSBundle mainBundle].localizedInfoDictionary;
if (!infoDict) {
infoDict = [NSBundle mainBundle].infoDictionary;
}
NSString *appName = [infoDict valueForKey:@"CFBundleDisplayName"];
if (!appName) appName = [infoDict valueForKey:@"CFBundleName"];
NSString *tipText = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Allow %@ to access your album in \"Settings -> Privacy -> Photos\""],appName];
_tipLabel.text = tipText;
[self.view addSubview:_tipLabel];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment