mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
NotificationContentExtension 本地化
This commit is contained in:
parent
57e9b55197
commit
adf72cd76a
@ -27,6 +27,7 @@
|
|||||||
0637FA8A20E0D58800E80174 /* NewServerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0637FA8920E0D58800E80174 /* NewServerViewController.swift */; };
|
0637FA8A20E0D58800E80174 /* NewServerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0637FA8920E0D58800E80174 /* NewServerViewController.swift */; };
|
||||||
0637FA8C20E0D7A700E80174 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0637FA8B20E0D7A700E80174 /* BaseViewController.swift */; };
|
0637FA8C20E0D7A700E80174 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0637FA8B20E0D7A700E80174 /* BaseViewController.swift */; };
|
||||||
063C499520E36BF9001BCA35 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 063C499720E36BF9001BCA35 /* Localizable.strings */; };
|
063C499520E36BF9001BCA35 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 063C499720E36BF9001BCA35 /* Localizable.strings */; };
|
||||||
|
065A4D4220EE1A31002EB2DB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 063C499720E36BF9001BCA35 /* Localizable.strings */; };
|
||||||
0661A543204FDA4100965E4E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0661A542204FDA4100965E4E /* AppDelegate.swift */; };
|
0661A543204FDA4100965E4E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0661A542204FDA4100965E4E /* AppDelegate.swift */; };
|
||||||
0661A545204FDA4100965E4E /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0661A544204FDA4100965E4E /* HomeViewController.swift */; };
|
0661A545204FDA4100965E4E /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0661A544204FDA4100965E4E /* HomeViewController.swift */; };
|
||||||
0661A54A204FDA4100965E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; };
|
0661A54A204FDA4100965E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; };
|
||||||
@ -311,6 +312,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
06802E5320ECC40C00767047 /* Assets.xcassets in Resources */,
|
06802E5320ECC40C00767047 /* Assets.xcassets in Resources */,
|
||||||
|
065A4D4220EE1A31002EB2DB /* Localizable.strings in Resources */,
|
||||||
0632CE2620EC9098003FDF46 /* MainInterface.storyboard in Resources */,
|
0632CE2620EC9098003FDF46 /* MainInterface.storyboard in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
|
|
||||||
UNUserNotificationCenter.current().setNotificationCategories([
|
UNUserNotificationCenter.current().setNotificationCategories([
|
||||||
UNNotificationCategory(identifier: "myNotificationCategory", actions: [
|
UNNotificationCategory(identifier: "myNotificationCategory", actions: [
|
||||||
UNNotificationAction(identifier: "copy", title: NSLocalizedString("Copy2"), options: UNNotificationActionOptions.init(rawValue: 0))
|
UNNotificationAction(identifier: "copy", title: NSLocalizedString("Copy2"), options: UNNotificationActionOptions.foreground)
|
||||||
], intentIdentifiers: [], options: .customDismissAction)
|
], intentIdentifiers: [], options: .customDismissAction)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
|
|||||||
let noticeLabel:UILabel = {
|
let noticeLabel:UILabel = {
|
||||||
let label = UILabel()
|
let label = UILabel()
|
||||||
label.textColor = UIColor.black
|
label.textColor = UIColor.black
|
||||||
label.text = "复制完成!"
|
label.text = NSLocalizedString("Copy", comment: "")
|
||||||
label.font = UIFont.systemFont(ofSize: 16)
|
label.font = UIFont.systemFont(ofSize: 16)
|
||||||
label.textAlignment = .center
|
label.textAlignment = .center
|
||||||
return label
|
return label
|
||||||
@ -26,8 +26,13 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
|
|||||||
self.view.addSubview(self.noticeLabel)
|
self.view.addSubview(self.noticeLabel)
|
||||||
self.preferredContentSize = CGSize(width: 0, height: 1)
|
self.preferredContentSize = CGSize(width: 0, height: 1)
|
||||||
}
|
}
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.preferredContentSize = CGSize(width: 0, height: 1)
|
||||||
|
}
|
||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
|
self.preferredContentSize = CGSize(width: 0, height: 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func didReceive(_ notification: UNNotification) {
|
func didReceive(_ notification: UNNotification) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user