From the error, you can see that UIButton
does not have a method called applyOutlinedThemeWithScheme
, which could mean that in your storyboard or XIB, you are using a UIButton instead of a MDCButton.
In your storyboard or XIB, go to Identity Inspector, make sure Class
is set to MDCButton
.
I faced the same problem. But I was building the UI through code.
import MaterialComponents.MaterialButtons
import MaterialComponents.MaterialButtons_Theming
let button = MDCButton()
button.applyTextTheme(withScheme: MDCContainerScheme())
The following helped me. I just called the option Product -> Clean Build Folder
. After that, the abnormal termination of the program disappeared.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.