Fix potential unknown selector exception
This commit is contained in:
parent
9362e4c341
commit
9cbb6b8f9a
@ -58,10 +58,11 @@
|
|||||||
withSettings:(NSDictionary *)settings
|
withSettings:(NSDictionary *)settings
|
||||||
{
|
{
|
||||||
id layout = [[self alloc] initWithDictionary:settings];
|
id layout = [[self alloc] initWithDictionary:settings];
|
||||||
|
SEL setFont = NSSelectorFromString(@"font");
|
||||||
|
|
||||||
[layout configureFormatter:formatter];
|
[layout configureFormatter:formatter];
|
||||||
|
|
||||||
if (settings && ![formatter isKindOfClass:UIMarkupTextPrintFormatter.class])
|
if (settings && [formatter respondsToSelector:setFont])
|
||||||
{
|
{
|
||||||
[layout configureTextFormatter:(UISimpleTextPrintFormatter *)formatter
|
[layout configureTextFormatter:(UISimpleTextPrintFormatter *)formatter
|
||||||
withSettings:settings];
|
withSettings:settings];
|
||||||
|
Loading…
Reference in New Issue
Block a user