Relative Content

Tag Archive for swiftuistackview

How can ı create a custom StackView programmatically

import Foundation import UIKit public struct Badge { let lineType: LineType let badgeType: BadgeType let withIcon: Bool let iconPosition: IconPosition let text: String let font: UIFont public init( lineType: LineType, badgeType: BadgeType, withIcon: Bool, iconPosition: IconPosition, text: String, font: UIFont ) { self.lineType = lineType self.badgeType = badgeType self.withIcon = withIcon self.iconPosition = iconPosition self.text […]

Creating a custom StackView programmatically

import Foundation import UIKit public struct Badge { let lineType: LineType let badgeType: BadgeType let withIcon: Bool let iconPosition: IconPosition let text: String let font: UIFont public init( lineType: LineType, badgeType: BadgeType, withIcon: Bool, iconPosition: IconPosition, text: String, font: UIFont ) { self.lineType = lineType self.badgeType = badgeType self.withIcon = withIcon self.iconPosition = iconPosition self.text […]

multilevel uistackviews autolayout not working

I’m trying to build a layout in swift using this idea: scroll -> uistackview (vertical) -> UIstackView (horizontal) -> UIstackview (vertical) [ view + n(UIStackview (horizontal)-> UIStackview (vertical) -> view + n Stackview ….)] i work until the second level but after that, all the views are displayed with frame 0 examples of implementation: