Skip to content

Commit 9dbe1a3

Browse files
committed
Removed Donate cell. Added Github link cel
1 parent ebaac0a commit 9dbe1a3

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

Jottre/Controllers/InitialScene/InitialViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import UIKit
99
import os.log
1010

11-
1211
class InitialViewController: UIViewController {
1312

1413
// MARK: - Properties

Jottre/Controllers/SettingsScene/SettingsExtensions.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extension SettingsViewController: UICollectionViewDelegate, UICollectionViewData
2525
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
2626

2727
if indexPath.row == 0 {
28-
28+
2929
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "appearanceSettingsCell", for: indexPath) as? AppearanceSettingsCell else {
3030
fatalError("Cell is not of type AppearanceSettingsCell")
3131
}
@@ -46,7 +46,8 @@ extension SettingsViewController: UICollectionViewDelegate, UICollectionViewData
4646
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "settingsCell", for: indexPath) as? SettingsCell else {
4747
fatalError("Cell is not of type SettingsCell")
4848
}
49-
cell.title = "Donate"
49+
cell.title = "Github repository"
50+
cell.image = UIImage(systemName: "arrow.up.right.square.fill")!
5051
return cell
5152

5253
}

Jottre/Controllers/SettingsScene/SettingsViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SettingsViewController: UIViewController {
3737
label.translatesAutoresizingMaskIntoConstraints = false
3838
label.font = UIFont.systemFont(ofSize: 18, weight: .regular)
3939
label.textAlignment = .center
40-
label.text = "Version 0.9 Build 1"
40+
label.text = "Version A71f Build 1"
4141
label.textColor = .secondaryLabel
4242
return label
4343
}()

Jottre/Views/SettingsCell/SettingsCell.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class SettingsCell: UICollectionViewCell {
1717
}
1818
}
1919

20+
var image: UIImage = UIImage() {
21+
didSet {
22+
imageView.image = image
23+
}
24+
}
25+
26+
2027

2128
// MARK: - Subviews
2229

@@ -28,6 +35,13 @@ class SettingsCell: UICollectionViewCell {
2835
return label
2936
}()
3037

38+
var imageView: UIImageView = {
39+
let imageView = UIImageView()
40+
imageView.translatesAutoresizingMaskIntoConstraints = false
41+
imageView.tintColor = UIColor.gray
42+
return imageView
43+
}()
44+
3145

3246

3347
// MARK: - Override methods
@@ -63,6 +77,12 @@ class SettingsCell: UICollectionViewCell {
6377
titleLabel.heightAnchor.constraint(equalToConstant: 50).isActive = true
6478
titleLabel.widthAnchor.constraint(greaterThanOrEqualToConstant: 20).isActive = true
6579

80+
addSubview(imageView)
81+
imageView.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true
82+
imageView.rightAnchor.constraint(equalTo: rightAnchor, constant: -10).isActive = true
83+
imageView.widthAnchor.constraint(equalToConstant: 35).isActive = true
84+
imageView.heightAnchor.constraint(equalToConstant: 35).isActive = true
85+
6686
}
6787

6888
}

0 commit comments

Comments
 (0)