DStack

master

ErusaevAP/DStack

DStack

  • DSTabsViewController
  • Extensions for working with constraints

DSTabsViewController

class TabsViewController: DSTabsViewController<HeaderView> {

 init() {
  super.init(viewControllers: [
   UIViewController(),
   UIViewController()
  ])
 }

 required
 init?(coder aDecoder: NSCoder) {
  fatalError('init(coder:) has not been implemented')
 }

}

Demo (Click for watching)

Watch the Demo

Extensions for working with constraints

let stackView = UIStackView()
 .addInRootView(view)
 .setTopAnchor(anchor: topLayoutGuide.bottomAnchor, marge: 10)
 .setRightAnchor(anchor: view.rightAnchor, marge: 10)
 .setBottomAnchor(anchor: bottomLayoutGuide.topAnchor, marge: 10)
 .setLeftAnchor(anchor: view.leftAnchor, marge: 10)

let side: CGFloat = 70

label1.addInRootView(stackView)
 .setSize(width: side, height: side)
 .setTopAlignment()
 .setCenterX()

Demo

ScreenShotPortrait

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Oct 22 2024 14:01:16 GMT-0900 (Hawaii-Aleutian Daylight Time)