-4

Please I am a novice iOS developer. I am working an Application. I just created ios screen but this is not suite the design level, I need to configure it again. Here, Iam attaching the screenshots as well. Please find these screen and guide me P.s. I am using stack view for the screen creation of the application

Here I am using one Vertical Stackview and 4 horizontal stack view

enter image description here

enter image description here

enter image description here

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
User
  • 42
  • 5
  • please share the code you attempted – Md. Ibrahim Hassan Sep 12 '17 at 09:13
  • 2
    Questions asking for debugging help need to include the code causing the issue, not just the desired and actual behaviour to be considered on-topic here on SO. Please include the code you use to set up the constraints or a screenshot of your Autolayout constraints on Storyboard. – Dávid Pásztor Sep 12 '17 at 09:13
  • Have you added spacing for your stackview? you can do that by clicking on your stack view, and click on attribute inspector and set a spacing. have a look at this [answer](https://stackoverflow.com/a/39757832/4056108) – chirag90 Sep 12 '17 at 09:16
  • @Md Ibrahim Hassan plz check i am updating my code – User Sep 12 '17 at 09:42
  • Set amount of lines to 1 – J. Doe Sep 12 '17 at 09:57
  • @ J Doe i am not getting your answer – User Sep 12 '17 at 10:07

1 Answers1

0

This code will be helpful:

extension UIButton {
    func roundCorners(_ corners:UIRectCorner, radius: CGFloat) {
        let path = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
        let mask = CAShapeLayer()
        mask.path = path.cgPath
        self.layer.mask = mask
    }
}

//Call this Extension like this:
 btn.roundCorners([.topLeft, .bottomRight], radius: 20.0)
  • I have use code before extension DesignableButton{ func roundedButton(){ let maskPAth1 = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: [.topLeft , .bottomRight], cornerRadii:CGSize(width:20.0, height:20.0)) let maskLayer1 = CAShapeLayer() maskLayer1.frame = self.bounds maskLayer1.path = maskPAth1.cgPath self.layer.mask = maskLayer1 } } – User Sep 12 '17 at 12:15