IOS TOPICS

IOS Introduction
Swift UI Label
Swift UI Button
Swift UI Text Field
Swift UI Slider
Swift UI Switch
Swift UI Stepper
Swift UI Date Picker
Swift UI Segmented Control
Views
Table View
Collection Views
SCROLL VIEW
iOS Content View
iOS View Controllers
iOS Bar interface
iOS Navigation interface
iOS Architect Pattern
iOS Libraries
iOS Web request and parsing
iOS user defaults
iOS Coredata and database

Create Round Button


To create round buttons we can add a corner radius to the square box around the text.

Code:

Text("Location") .fontWeight(.bold) .font(.title) .padding() .background(Color.blue) .cornerRadius(40) .foregroundColor(.white)

Output:

ios output

To create round borders is slightly more difficult however, but can be done by overlaying a border on the button itself.

Code:

Text("Location") .fontWeight(.bold) .font(.title) .padding() .background(Color.blue) .cornerRadius(40) .foregroundColor(.white) .padding(10) .overlay(RoundedRectangle(cornerRadius: 40).stroke(Color.blue,lineWidth: 5))

Output:

ios output