Skip to content

Releases: sakiyamaK/DeclarativeUIKit

2.2.0

21 Mar 04:10
Compare
Choose a tag to compare

UICollectionLayoutListConfiguration, UIContextualAction, UISwipeActionsConfiguration

#121 #134 #135

2.1.0

13 Feb 01:45
1c74f37
Compare
Choose a tag to compare

some uibutton method

merge #133

2.0.2

09 Nov 09:09
Compare
Choose a tag to compare

func reset()func resetDeclarativeUIKitLayout()に修正

2.0.1

06 Nov 01:39
Compare
Choose a tag to compare

UIView.decratativeのresetのデフォルト値がtrueのままだったのでfalseに更新

2.0.0

04 Nov 15:59
Compare
Choose a tag to compare

JP

declarativeメソッドのresetパラメータのデフォルト値をtrueからfalseに変更しました
これによりdeclarativeメソッドもより簡易的に繋げることができます

before

self.declarative {
  UIStackView.vertical {
    UIlabel()
    UIlabel()
  }
}.declarative(safeArea: .init(all: false), reset: false) {
  //SafeAreaを無視したレイアウトを上から足す
  UIButton()
    .bottom()
    .right()
    .offset(x: -16, y: -16)

}

after

self.declarative {
  UIStackView.vertical {
    UIlabel()
    UIlabel()
  }
}.declarative(safeArea: .init(all: false)) {
  //SafeAreaを無視したレイアウトを上から足す
  UIButton()
    .bottom()
    .right()
    .offset(x: -16, y: -16)

}

EN

Changed the default value of the reset parameter of the declarative method from true to false
This allows declarative methods to be connected in a simpler way.

before

self.declarative {
  UIStackView.vertical {
    UIlabel()
    UIlabel()
  }
}.declarative(safeArea: .init(all: false), reset: false) {
  // Add the layout ignoring the SafeArea from the top
  UIButton()
    .bottom()
    .right()
    .offset(x: -16, y: -16)

}

after

self.declarative {
  UIStackView.vertical {
    UIlabel()
    UIlabel()
  }
}.declarative(safeArea: .init(all: false)) {
  // Add the layout ignoring the SafeArea from the top
  UIButton()
    .bottom()
    .right()
    .offset(x: -16, y: -16)

}

1.15.0

03 Nov 07:13
Compare
Choose a tag to compare

declarative UIButton.Configuration

1.14.0

05 Jul 07:32
Compare
Choose a tag to compare

declarative UIBarButtonItem, UIBarItem
applyNavigaitonView method

sample

1.13.0

17 Apr 16:25
Compare
Choose a tag to compare
  • declarative UISheetPresentationController
  • applyView, applySheetPresentationController method
UIViewController()
    .applyView {
        $0.backgroundColor(.white)
    }
    .declarative {
        UIScrollView.vertical {
            UIStackView.vertical {
                (0...50).compactMap { idx in
                    UILabel("\(idx)でーす")
                        .textAlignment(.center)
                        .contentPriorities(.init(vertical: .required))
                        .customSpacing(8)
                }
            }
            .padding(insets: .init(vertical: 30))
        }
    }
    .applySheetPresentationController {
        $0.detents([.large(), .medium()])
            .preferredCornerRadius(16)
            .prefersGrabberVisible(true)
            .prefersScrollingExpandsWhenScrolledToEdge(false)
            .largestUndimmedDetentIdentifier(.large)
    }
    .present(from: self, animated: true)

1.12.0

23 Jan 10:38
Compare
Choose a tag to compare

deperacated imperative method

  UIButton("deprecated imperative").imperative {
      let button = $0 as! UIButton
      button.titleLabel?.font = UIFont.systemFont(ofSize: 12)
      button.titleLabel?.textColor = .green
  }

Let's use apply
no cast needed

  UIButton("apply").apply {
      // no use cast
    // let button = $0 as! UIButton
      $0.titleLabel?.font = UIFont.systemFont(ofSize: 12)
      $0.titleLabel?.textColor = .green
  }

1.11.1

16 Jan 10:41
Compare
Choose a tag to compare

bugfix UIImageView.tintColor