[Solved] how to fix error of “Cannot assign to property: ‘setBarTintGradientColors’ is a method” [closed]


setBarTintGradientColors is a method, meaning it must take an argument (a list of colors). Therefore, you will need something like this instead of assignment:

CRGradientNavigationBar.appearance().setBarTintGradientColors(colors)

As a rule of thumb, whenever you have set in the name, it is a function, not an attribute, meaning that you will need to pass an argument instead of assign.

1

solved how to fix error of “Cannot assign to property: ‘setBarTintGradientColors’ is a method” [closed]