Post

Replies

Boosts

Views

Activity

Reply to tableview.reloadRows() takes three hit to reload
so I just paste the necessary part here. Sorry, but it was less than necessary. What I am trying to do is that I try to reload the row of my tableview whenever user click on a specific row by doing all the logic inside the didSelectRowAt() method as I have stated above. Please show enough code to reproduce the issue. As I wrote I cannot reproduce the issue with your shown code.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21
Reply to Custom color management
Hi, this is my code : Thanks for showing your code, but maybe my words were not well representing what I wanted. But anyway, if you want some changeable color set, why don't you make it an environment object? import SwiftUI struct ContentView: View { 		@EnvironmentObject var colorManager: ColorManager 		var body: some View { 				Text("Hello, world!") 						.padding() 						//↓ Apply the changeable color 						.background(colorManager.spotifyGreen) 		} } class ColorManager: ObservableObject { 		@Published var spotifyGreen = Color("SpotifyGreen") 		//... } struct ContentView_Previews: PreviewProvider { 		static var previews: some View { 				ContentView() 						.environmentObject(ColorManager()) 		} }
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’21
Reply to Launch app by Target.
Now every time I hit compile, Xcode just launching my widget's Target by default, not my app's Target Have you chosen the right target you want to run on the Choose scheme button on the toolbar - https://help.apple.com/xcode/mac/current/#/devf0d1df47a of Xcode?
Jan ’21