To create a border with rounded corners, you can draw a rounded rectangle and overlay on the button like this: In the code, we use a RoundedRectangle and its stroke modifier to create the rounded border. Added this following constrain to look things better –Ĭhanged the class def like this (as I added a UIPicker) class ViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate Īdded this view in the scroll view thats all. 1.border(Color.purple, width: 5, cornerRadius: 20) However, the latest beta of Xcode 11 has deprecated the function call. Make sure the axis is ‘Horizontal’ and distribution is ‘proportionally’. These are all fields I needed, but in order to get label and slider in a single row – select these two and press stack button. black, width: 5) Rectangular border around Text view with custom width Add rounded border to a Text view using. Then I added Rounded Text Field, Label, Slider (font size), picker, another label and scroll view In property editor changed the Distribution as ‘Fill Equally’ I added a navigation bar for the title – gave a name. Simple rounded colour buttons in UIScrollviewĬreate a new project – as a single view application.Getting all fonts in the system (iOS Device) and show in UIPicker.Off course stack Layout (vertical and horizontal) The colors you choose will affect a number of items, like your: Messenger launcher.Initially I faced a lot of issue when tried to make a UI like this without stack layout.Īfter I learned little bit of stack layout – I could easily manage to make such layout for all screens. Customisation of text essentially means Choosing Font, Changing Font Size, picking colour etc.
Aim: Wanted to give user customisation option on written text.