You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Xcode 12.4, macOS 11.0 app. Every time we switch the system dark and light mode, the CPU goes up to 100%. Instruments show that there's an increasing number of ButtonBehavior
Suspect State in a row in LazyVStack
Every cell has its own toggle state
structCell:View{enumToggleState{case general
case request
case response
}letitem:Item@StateprivatevartoggleState:ToggleState=.general
func toggleButton(text:String, state:ToggleState)->someView{Button(action:{self.toggleState = state }){Text(text).foregroundColor(state == toggleState ? Color.label :Color.secondary).fontWeight(state == toggleState ? .bold :.regular)}.buttonStyle(BorderlessButtonStyle())}}
Removing the buttons fix the problem. The workaround is to use Text with onTapGesture
With Xcode 12.4, macOS 11.0 app. Every time we switch the system dark and light mode, the CPU goes up to 100%. Instruments show that there's an increasing number of
ButtonBehavior
Suspect State in a row in LazyVStack
Every cell has its own toggle state
Removing the buttons fix the problem. The workaround is to use
Text
withonTapGesture
The text was updated successfully, but these errors were encountered: