Closed valeriomazzeo closed 10 years ago
move this stuff:
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1)
{
self.innerStrokeLineWidth = 1.5;
self.innerStrokeColor = UIColor.whiteColor;
self.backgroundColor = [UIColor colorWithWhite:0.816 alpha:1];
self.shadowOffset = CGSizeMake(0, .5);
self.shadowBlur = 2.5;
self.shadowColor = UIColor.blackColor;
}
else
{
self.backgroundColor = [UIColor clearColor];
}
from initialize to init solves the problem, but I don't really know what you wanted to achieve...
OK yes, a real bug on iOS 6. When I load the view, it's ok (SDSegementedControl within view within nav controller). But when i push a new view and come back, error on
[super setBackgroundColor:backgroundColor];
(l.1166)
But on iOS 7, everything is ok.
Here you see the call stack when we get back to the last view controllers containing SDSegmentedControl
it works on the example project, but not on mine... I can't understand what the difference is so far. I am not using interface builder.
Not using IB too... It is a MWPhotoBrowser which is pushed, and when i go back, horror...
The example uses IB.
Also the other properties set with UIAppeareance work fine, just the background color does not.
the problem was that the backgroundColor property for some reason was going in conflict with the original backgroundColor property of UIView. Using another name (backgroundColour) in this case, fix the problem.
it appears black (because when it reaches drawRect self.backgroundColor is nil for some reasons).
even changing it from the uiappeareance protocol doesn't make any difference.
it looks like this a0ff092 doesn't work on iOS6 when compiled with the new sdk (xcode 5).