if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction - could this mean something here?

后端 未结 2 1795
忘掉有多难
忘掉有多难 2020-12-17 03:36

I am trying to find why a collection of custom UIButtons does not work. In a version described in my earlier post I created a circle of UIButtons programmatically in Swift 3

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 04:24

    I'd just constrain the parent UIView and constrain all of the buttons to the center of the parent view and override layoutSubviews. In layout subviews you can manipulate .constant of the centerX and centerY constraints for the buttons to reposition them. Alternatively you can just center all of them and use the .transform property of each button to move them into place.

提交回复
热议问题