Post

Replies

Boosts

Views

Activity

Reply to How to remove space occupied by text's on swiftui
Is there a better solution? This is how I managed to solve the problem: Group { if isEditMode { Text("The alarm will ring at") .padding(.bottom, 10) Text(TimeMH().ToString(minuteAngle, hourAngle)) .font(.system(size: 25)) .background(Rectangle() .fill(Color(UIColor.lightGray)) .frame(width: 90, height: 40) .cornerRadius(10) .shadow(radius: 5)) } else { EmptyView() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Why is my List elements are deleted if I ON/OFF darkmode.
The AlarmModel hasn't changed from the previous post. The button is in my TopBarView, and thats just toggle the isDarkMode bool. Button looks like: Button(action: {self.isDarkMode.toggle()}) { //there is just an image }. So I'm almost certain the problem is because I initialize an AlarmModel in the HomeView. I did this because the HomeView calls the other Views (and passes the initialized variables to the called Views), this is the only way I could connect the List (and other bool variables).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to Is DragGesture buggy or am I messing something up?
I see, thanks. Do u have any idea how can I solve this discontinuity problem? Maybe any alternative to the atan2 function?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to The compiler is unable to type-check this expression in reasonable time in Xcode 12 with SwiftUI Error in SwiftUI
What do you think exactly? Sorry, but I'm a complete beginner. Why is your proposed solution better?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to How to remove space occupied by text's on swiftui
Is there a better solution? This is how I managed to solve the problem: Group { if isEditMode { Text("The alarm will ring at") .padding(.bottom, 10) Text(TimeMH().ToString(minuteAngle, hourAngle)) .font(.system(size: 25)) .background(Rectangle() .fill(Color(UIColor.lightGray)) .frame(width: 90, height: 40) .cornerRadius(10) .shadow(radius: 5)) } else { EmptyView() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Extra argument 'selection' in call error in ListView.
Thanks, thats works! Extra question: how can I bind the selection variable to an other view in the easiest way? I have a button in the other view with which I want to delete the selected element.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Why is my List elements are deleted if I ON/OFF darkmode.
The AlarmModel hasn't changed from the previous post. The button is in my TopBarView, and thats just toggle the isDarkMode bool. Button looks like: Button(action: {self.isDarkMode.toggle()}) { //there is just an image }. So I'm almost certain the problem is because I initialize an AlarmModel in the HomeView. I did this because the HomeView calls the other Views (and passes the initialized variables to the called Views), this is the only way I could connect the List (and other bool variables).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Why is my List elements are deleted if I ON/OFF darkmode.
I'm sure there is a better solution for data binding, but this opportunity what I've found to share data (Swift UI v.1). Let me know if you need any more information about the code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Why is my menu open upwards when I want it to open downwards in Swift 13.4?
Got it, thanks for your reply.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23