openExistingContact:... was creating a UIBarButtonItem with a style of UIBarButtonSystemItemCancel. However UIBarButtonSystemItemCancel is not a style, it is a type of item. Instead we should use UIBarButtonItemStyleDone
This will avoid raising a -Wenum-conversion error and fixes the bug for the style ending up being the deprecated UIBarButtonItemStyleBordered (0x1) by accident.
You can verify by enabling -Wenum-conversion and -Werror=enum-conversion in your compilation. The current state of the code will fail with a compiler error for using the wrong enum value. Building with this change will succeed without issue.
openExistingContact:...
was creating aUIBarButtonItem
with astyle
ofUIBarButtonSystemItemCancel
. HoweverUIBarButtonSystemItemCancel
is not a style, it is a type of item. Instead we should useUIBarButtonItemStyleDone
This will avoid raising a
-Wenum-conversion
error and fixes the bug for the style ending up being the deprecatedUIBarButtonItemStyleBordered
(0x1
) by accident.You can verify by enabling
-Wenum-conversion
and-Werror=enum-conversion
in your compilation. The current state of the code will fail with a compiler error for using the wrong enum value. Building with this change will succeed without issue.