-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* More forgiving date format. * More descriptive errors. * Add KID check. * Extend date format. * Add AppVersionCell. * Add border-less cell.
- Loading branch information
Showing
5 changed files
with
151 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/*- | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-app-core-ios | ||
* --- | ||
* Copyright (C) 2021 T-Systems International GmbH and all other contributors | ||
* --- | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* ---license-end | ||
*/ | ||
// | ||
// AppVersionCell.swift | ||
// | ||
// | ||
// Created by Yannick Spreen on 5/16/21. | ||
// | ||
|
||
#if os(iOS) | ||
import Foundation | ||
import UIKit | ||
|
||
public class AppVersionCell: UITableViewCell { | ||
@IBOutlet weak var versionLabel: UILabel! | ||
|
||
public override func layoutSubviews() { | ||
super.layoutSubviews() | ||
|
||
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String | ||
let format = l10n("app-version") | ||
versionLabel.text = String(format: format, version ?? "?") | ||
removeSectionSeparator() | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/*- | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-app-core-ios | ||
* --- | ||
* Copyright (C) 2021 T-Systems International GmbH and all other contributors | ||
* --- | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* ---license-end | ||
*/ | ||
// | ||
// UITableViewCell.swift | ||
// | ||
// | ||
// Created by Yannick Spreen on 5/16/21. | ||
// | ||
|
||
#if os(iOS) | ||
import UIKit | ||
|
||
public extension UITableViewCell { | ||
func removeSectionSeparator() { | ||
for subview in subviews { | ||
if | ||
subview != contentView, | ||
abs(subview.frame.width - frame.width) <= 0.1, | ||
subview.frame.height < 2 | ||
{ | ||
subview.alpha = 0 | ||
} | ||
} | ||
} | ||
} | ||
|
||
public class BorderLessSectionCell: UITableViewCell { | ||
public override func layoutSubviews() { | ||
super.layoutSubviews() | ||
removeSectionSeparator() | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters