chore: change puls.circle.fill

This commit is contained in:
sunxiaojian 2021-03-03 12:26:14 +08:00
parent a0aa8b9194
commit 492ad98d9b
7 changed files with 254 additions and 20 deletions

View File

@ -28,6 +28,9 @@ internal enum Asset {
internal enum Asset { internal enum Asset {
internal static let mastodonTextLogo = ImageAsset(name: "Asset/mastodon.text.logo") internal static let mastodonTextLogo = ImageAsset(name: "Asset/mastodon.text.logo")
} }
internal enum Circles {
internal static let plusCircleFill = ImageAsset(name: "Circles/plus.circle.fill")
}
internal enum Colors { internal enum Colors {
internal enum Background { internal enum Background {
internal static let onboardingBackground = ColorAsset(name: "Colors/Background/onboarding.background") internal static let onboardingBackground = ColorAsset(name: "Colors/Background/onboarding.background")
@ -66,6 +69,7 @@ internal enum Asset {
internal static let lightSecondaryText = ColorAsset(name: "Colors/lightSecondaryText") internal static let lightSecondaryText = ColorAsset(name: "Colors/lightSecondaryText")
internal static let lightSuccessGreen = ColorAsset(name: "Colors/lightSuccessGreen") internal static let lightSuccessGreen = ColorAsset(name: "Colors/lightSuccessGreen")
internal static let lightWhite = ColorAsset(name: "Colors/lightWhite") internal static let lightWhite = ColorAsset(name: "Colors/lightWhite")
internal static let plusCircleFill = ImageAsset(name: "Colors/plus.circle.fill")
internal static let systemOrange = ColorAsset(name: "Colors/system.orange") internal static let systemOrange = ColorAsset(name: "Colors/system.orange")
} }
internal enum Welcome { internal enum Welcome {

View File

@ -0,0 +1,9 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"provides-namespace" : true
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "plus.circle.fill.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,89 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 0.000000 0.000000 scn
12.007203 -0.000002 m
18.586674 -0.000002 24.000000 5.413311 24.000000 12.007201 c
24.000000 18.586702 18.586674 24.000000 11.992814 24.000000 c
5.413314 24.000000 0.000000 18.586702 0.000000 12.007201 c
0.000000 5.413311 5.413314 -0.000002 12.007203 -0.000002 c
h
6.478707 12.007201 m
6.478707 12.827837 7.068974 13.432522 7.875220 13.432522 c
10.567494 13.432522 l
10.567494 16.124798 l
10.567494 16.931015 11.172179 17.535698 11.992814 17.535698 c
12.813449 17.535698 13.418134 16.931015 13.418134 16.124798 c
13.418134 13.432522 l
16.110380 13.432522 l
16.931015 13.432522 17.521311 12.827837 17.521311 12.007201 c
17.521311 11.186566 16.931015 10.581882 16.110380 10.581882 c
13.418134 10.581882 l
13.418134 7.889637 l
13.418134 7.083389 12.813449 6.478704 11.992814 6.478704 c
11.172179 6.478704 10.567494 7.083389 10.567494 7.889637 c
10.567494 10.581882 l
7.875220 10.581882 l
7.068974 10.581882 6.478707 11.186566 6.478707 12.007201 c
h
f
n
Q
endstream
endobj
3 0 obj
1071
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000001161 00000 n
0000001184 00000 n
0000001357 00000 n
0000001431 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1490
%%EOF

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "plus.circle.fill.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,101 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
1.000000 1.000000 1.000000 scn
30.000000 15.000000 m
30.000000 6.715729 23.284271 0.000000 15.000000 0.000000 c
6.715729 0.000000 0.000000 6.715729 0.000000 15.000000 c
0.000000 23.284271 6.715729 30.000000 15.000000 30.000000 c
23.284271 30.000000 30.000000 23.284271 30.000000 15.000000 c
h
f
n
Q
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 0.000000 0.000000 scn
15.009004 0.000000 m
23.233341 0.000000 30.000000 6.766640 30.000000 15.009003 c
30.000000 23.233379 23.233341 30.000000 14.991017 30.000000 c
6.766642 30.000000 0.000000 23.233379 0.000000 15.009003 c
0.000000 6.766640 6.766643 0.000000 15.009004 0.000000 c
h
8.098384 15.009003 m
8.098384 16.034798 8.836217 16.790653 9.844025 16.790653 c
13.209368 16.790653 l
13.209368 20.155996 l
13.209368 21.163769 13.965223 21.919624 14.991017 21.919624 c
16.016811 21.919624 16.772667 21.163769 16.772667 20.155996 c
16.772667 16.790653 l
20.137974 16.790653 l
21.163769 16.790653 21.901638 16.034798 21.901638 15.009003 c
21.901638 13.983208 21.163769 13.227352 20.137974 13.227352 c
16.772667 13.227352 l
16.772667 9.862047 l
16.772667 8.854239 16.016811 8.098381 14.991017 8.098381 c
13.965223 8.098381 13.209368 8.854239 13.209368 9.862047 c
13.209368 13.227352 l
9.844025 13.227352 l
8.836217 13.227352 8.098384 13.983208 8.098384 15.009003 c
h
f
n
Q
endstream
endobj
3 0 obj
1426
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 30.000000 30.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000001516 00000 n
0000001539 00000 n
0000001712 00000 n
0000001786 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1845
%%EOF

View File

@ -71,23 +71,13 @@ final class MastodonRegisterViewController: UIViewController, NeedsDependency, O
return button return button
}() }()
let plusIconBackground: UIImageView = {
let icon = UIImageView()
let boldFont = UIFont.systemFont(ofSize: 24)
let configuration = UIImage.SymbolConfiguration(font: boldFont)
let image = UIImage(systemName: "plus.circle", withConfiguration: configuration)
icon.image = image
icon.tintColor = .white
return icon
}()
let plusIcon: UIImageView = { let plusIcon: UIImageView = {
let icon = UIImageView() let icon = UIImageView()
let boldFont = UIFont.systemFont(ofSize: 24)
let configuration = UIImage.SymbolConfiguration(font: boldFont) let image = Asset.Circles.plusCircleFill.image.withRenderingMode(.alwaysTemplate)
let image = UIImage(systemName: "plus.circle.fill", withConfiguration: configuration)
icon.image = image icon.image = image
icon.tintColor = Asset.Colors.Icon.plus.color icon.tintColor = Asset.Colors.Icon.plus.color
icon.backgroundColor = .white
return icon return icon
}() }()
@ -234,7 +224,6 @@ extension MastodonRegisterViewController {
guard let self = self else { return } guard let self = self else { return }
let alpha: CGFloat = isHighlighted ? 0.8 : 1 let alpha: CGFloat = isHighlighted ? 0.8 : 1
self.plusIcon.alpha = alpha self.plusIcon.alpha = alpha
self.plusIconBackground.alpha = alpha
self.photoButton.alpha = alpha self.photoButton.alpha = alpha
} }
.store(in: &disposeBag) .store(in: &disposeBag)
@ -305,12 +294,7 @@ extension MastodonRegisterViewController {
photoButton.centerXAnchor.constraint(equalTo: photoView.centerXAnchor), photoButton.centerXAnchor.constraint(equalTo: photoView.centerXAnchor),
photoButton.centerYAnchor.constraint(equalTo: photoView.centerYAnchor), photoButton.centerYAnchor.constraint(equalTo: photoView.centerYAnchor),
]) ])
plusIconBackground.translatesAutoresizingMaskIntoConstraints = false
photoView.addSubview(plusIconBackground)
NSLayoutConstraint.activate([
plusIconBackground.trailingAnchor.constraint(equalTo: photoButton.trailingAnchor),
plusIconBackground.bottomAnchor.constraint(equalTo: photoButton.bottomAnchor),
])
plusIcon.translatesAutoresizingMaskIntoConstraints = false plusIcon.translatesAutoresizingMaskIntoConstraints = false
photoView.addSubview(plusIcon) photoView.addSubview(plusIcon)
NSLayoutConstraint.activate([ NSLayoutConstraint.activate([
@ -526,6 +510,11 @@ extension MastodonRegisterViewController {
signUpButton.addTarget(self, action: #selector(MastodonRegisterViewController.signUpButtonPressed(_:)), for: .touchUpInside) signUpButton.addTarget(self, action: #selector(MastodonRegisterViewController.signUpButtonPressed(_:)), for: .touchUpInside)
} }
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
plusIcon.layer.cornerRadius = plusIcon.frame.width/2
plusIcon.clipsToBounds = true
}
} }
extension MastodonRegisterViewController: UITextFieldDelegate { extension MastodonRegisterViewController: UITextFieldDelegate {