0 CoreFoundation 0x0000000183f687cc ___exceptionPreprocess + 164 1 libobjc.A.dylib 0x000000018123b2e4 _objc_exception_throw + 88 2 CoreFoundation 0x000000018406e5f0 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0 3 UIKitCore 0x0000000186849a48 -[UIButtonLegacyVisualProvider _newLabelWithFrame:] + 60 4 UIKitCore 0x00000001867652b0 -[UIButtonLegacyVisualProvider _setupTitleViewRequestingLayout:] + 84 5 UIKitCore 0x0000000186763ba4 -[UIButtonLegacyVisualProvider titleViewCreateIfNeeded:] + 44 6 UIKitCore 0x00000001867d3f74 -[UIButton titleLabel] + 36
Hello bro, in IOS 18 our team find issue ,We created a button like this: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.titleLabel.font = [UIFont fontWithName:paramFontName size: fontSize]; Please tell me whether we need to set button frame before we call button.titleLabe?