Browse Source

[Added] Corner shadows in swift

v0.17
Dibya Malla 2 years ago
parent
commit
fabd4026d3
  1. 2
      GME Remit/Extensions/UIView+Ext.swift
  2. 11
      GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift
  3. 2
      GME Remit/Modules/Home/User Interface/View/Custom/HomeCarouselView.swift
  4. 7
      GME Remit/Modules/Home/User Interface/View/HomeViewController.swift

2
GME Remit/Extensions/UIView+Ext.swift

@ -649,9 +649,7 @@ extension UIView {
if let centerY = centerY {
centerYAnchor.constraint(equalTo: centerY , constant: paddingY).isActive = true
}
}
}
extension UIStackView {

11
GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift

@ -55,6 +55,7 @@ class HomeCollectionTableViewCell: UITableViewCell {
}()
@IBOutlet weak var containerView: UIStackView!
@IBOutlet weak var collectionView: UICollectionView!
private var menus: [HomeCollectionModel]?
weak var homeCollectionDelegate: HomeCollectionDelegate?
@ -74,11 +75,11 @@ class HomeCollectionTableViewCell: UITableViewCell {
}
func setup(_ rates: [ExchangeRateModel]?) {
// collectionView.addObserver(
// self, forKeyPath: "contentSize",
// options: NSKeyValueObservingOptions.old,
// context: nil
// )
collectionView.addObserver(
self, forKeyPath: "contentSize",
options: NSKeyValueObservingOptions.old,
context: nil
)
exchangeRateView.set(rates)

2
GME Remit/Modules/Home/User Interface/View/Custom/HomeCarouselView.swift

@ -24,7 +24,7 @@ class HomeCarouselView: UIView {
private let pageControl: CustomPageControl = {
let view = CustomPageControl(frame: .zero)
view.currentPageIndicatorTintColor = .theme2E89FF
view.currentPageIndicatorTintColor = .themeBlack
view.pageIndicatorTintColor = .themeGray2
view.translatesAutoresizingMaskIntoConstraints = false
return view

7
GME Remit/Modules/Home/User Interface/View/HomeViewController.swift

@ -270,6 +270,8 @@ class HomeViewController: UIViewController {
object: nil
)
self.navigationController?.navigationBar.setValue(true, forKey: "hidesShadow")
}
override func viewWillAppear(_ animated: Bool) {
@ -288,6 +290,10 @@ class HomeViewController: UIViewController {
}
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.navigationItem.title = ""
@ -322,6 +328,7 @@ class HomeViewController: UIViewController {
private func setupHierachy() {
accountDetailView.setupCornerRadius(20,maskedCorners: [.layerMinXMaxYCorner, .layerMaxXMaxYCorner])
accountDetailView.layer.addShadow(with: UIColor.gray, shadowRadius: 10.0, shadowOffset: CGSize(width: 0, height: 1))
uploadSlipButton.titleLabel?.font = .sanfrancisco(.bold, size: 12)
uploadSlipButton.set(cornerRadius: 20)

Loading…
Cancel
Save