Oh its my mistake thanks❤️
Post
Replies
Boosts
Views
Activity
Sure and Thanks 😇
No, i have designed the CardView in another swift ui
im unable to set it as a button in contentView
it should work as when a click that button it should open that CardView Swift UI
but i dont know how to call that in buttoN
Whoa thanks i will try it out and tell you
Thanks❤️✌️
This code perfectly working but my CardView is so much smaller than the original here is the photo graph
import SwiftUI
struct CardView: View {
var body: some View {
ZStack {
Color.background
.ignoresSafeArea()
HStack{
Image(systemName: "chevron.backward")
.foregroundColor(Color.white)
Spacer()
Text("Wallet")
.foregroundColor(Color.white)
Spacer()
Image(systemName: "ellipsis")
.foregroundColor(Color.white)
}
.padding()
.padding(.top, -400.0)
HStack(alignment: .top){
Text("Cards Wallet")
.foregroundColor(Color.white)
}
.padding(.top, -325.0)
//MARK: View Bar is added
ZStack{CardViewBar()
.fill(Color.background_1)
.frame(width: 350, height: 3)
CardViewBar()
.fill(Color.CardViewBar)
.frame(width:175,height: 3)
.padding(.leading, -175.0)
}
.padding(.bottom, 575.0)
//MARK: Credit Card is Stacked
ZStack{
Image("Credit Card 3")
.padding(.bottom, 80.28)
Image("Credit Card 2")
.padding(.bottom, 40.14)
Image("Credit Card 1")
}
.padding(.bottom, 200.0)
ScrollCircle()
.fill(Color.background_1)
.frame(width: 10, height: 10, alignment: .center)
.padding(.top, 90.0)
ScrollCircle()
.fill(Color.background_1)
.frame(width: 10, height: 10, alignment: .center)
.padding([.top, .leading], 90.0)
ScrollCircle()
.fill(Color.CardViewBar)
.frame(width: 10, height: 10, alignment: .center)
.padding([.top, .trailing], 90.0)
Image("Icons Menu")
.padding(.top, 225.0)
ZStack {
DropDownBar()
.fill(Color.background_1)
.frame(width: 350, height: 250)
.padding(.top, 600.0)
VStack {
HStack {
Image(systemName: "plus")
.resizable()
.frame(width: 24, height: 24)
Text("Add Card")
.font(.title)
.fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_MENU_TOKEN@*/)
}
.padding(.trailing, 150.0)
.padding(.top, 100.0)
Text("Add your debit/credit card")
.font(.body)
.fontWeight(.bold)
.foregroundColor(Color("Background"))
.padding(.top, -12.0)
.padding(.trailing, 60.0)
ZStack {
ListRectShape()
.fill(Color.background)
.frame(width: 310, height: 44)
.padding(.top, 15.0)
Text("Card Number")
.font(.body)
.padding(.trailing, 150.0)
.padding(.top)
}
ZStack {
ListRectShape()
.fill(Color.background)
.frame(width: 310, height: 44)
.padding(.top, 22.0)
Text("Card Holder Name")
.font(.body)
.padding(/*@START_MENU_TOKEN@*/.trailing, 110.0/*@END_MENU_TOKEN@*/)
.padding(.top, 25.0)
}
}
.padding(.top, 500.0)
.foregroundColor(Color.white)
}
}
}
}
struct CardView_Previews: PreviewProvider {
static var previews: some View {
CardView()
}
}
and here is the image
Ok i will try and update
the CardView is just toggle opening how to add CardView to open as full Screen when the button is pressed
Nope not yet thanks
Doesn’t work means it throws error on Json decoder in catch statement
it throws this error only for the first code not for the second cide below the comment
although those two code looks similar to me do you find any differences in these two codes (above and below the comment)
I need a button in my app , when i click that button it should open the iPhone settings app and automatically navigate through the location settings
Yeah your right i found out the mistake
Yes you are correct
Exactly the thing I needed ,Thanks
also if some need extra help watch this Youtube video
https://youtu.be/Zrp7RzAwm8Q