Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
devmehmetates committed Dec 10, 2023
1 parent 259629a commit 3718dde
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,27 @@ final class ExampleView: SwiftyViewController {
}
}

final class CardView: UIView {
@available(iOS 13.0, *)
final class CardView: SwiftyView {
private lazy var label = UILabel("History")
.font(.boldSystemFont(ofSize: 16))
var image: String?

convenience init(image: String) {
self.init(frame: .zero)

self.init()
self.image = image
reDraw()
}

override var content: UIView {
VerticalStack {
UIImageView()
.asyncImage(URL(string: image))
.contentMode(.scaleAspectFit)
.cornerRadius(8)
.clipsToBounds(true)
if let image {
UIImageView()
.asyncImage(URL(string: image))
.contentMode(.scaleAspectFit)
.cornerRadius(8)
.clipsToBounds(true)
}

BaseButton(type: .system)
.setTitle("Update")
Expand All @@ -64,18 +72,9 @@ final class CardView: UIView {
}.padding()
.backgroundColor(.systemBackground)
.cornerRadius(10)
.shadow().embedTo(self)
.fillToSuperView()
.shadow()
.frame(height: 50.responsiveW)
}

override init(frame: CGRect) {
super.init(frame: frame)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
```

Expand Down

0 comments on commit 3718dde

Please sign in to comment.