iOS: explicit synthesize properties as readwrite

The synthesized properties were defined as (read only)
methods in the UIViewController API in iOS9, and we
extended them into readwrite properties in our own
sub class to enable some local bookkeeping in addition
to normal overriding.

But in iOS10, Apple has changed the methods into being
readonly properties instead. The difference then is
that automatic property synthesizing
will ignore our local readwrite declarations, and use
the declarations in the super class instead. And this
will lead to a runtime crash on iOS10 since no
setter methods are generated.

This patch will instead explicit synthesize the affected
properties to ensure that both getters and setters will be
generated.

Change-Id: Iac330e991b8a0fe335e383e1f7d9ff30c0ce1559
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
bb10
Richard Moe Gustavsen 2016-09-06 11:00:21 +02:00
parent d3389a6d46
commit e32ecdb280
1 changed files with 4 additions and 0 deletions

View File

@ -222,6 +222,10 @@
@implementation QIOSViewController
@synthesize prefersStatusBarHidden;
@synthesize preferredStatusBarUpdateAnimation;
@synthesize preferredStatusBarStyle;
- (id)initWithQIOSScreen:(QIOSScreen *)screen
{
if (self = [self init]) {