Reputation: 1578
I had to customize UIViewController and Used following codes to customize the UIViewController toolbar at the bottom
[self.navigationController.toolbar setBackgroundImage:[UIImage imageWithCGImage:[UIImage imageNamed:@"List/footer.png"].CGImage scale:2 orientation:UIImageOrientationDown] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
[self.navigationController.toolbar setShadowImage:[UIImage imageNamed:@"transparent.png"] forToolbarPosition:UIToolbarPositionAny];
[self.navigationController.toolbar setBackgroundColor:[UIColor clearColor]];
As it is obvious in screenshot picture there is one white pixel under the customized toolbar. How can I remove the pixel?
Upvotes: 0
Views: 138
Reputation: 165
It is a simple answer but I have same situation lots of times :) Try to control image List/footer.png it can has 1px transparency bottom of itself?
Another situation is in iOS project I have never give a path like List/
Also my advice is if you want to give a shadow don't use image instead of this use QuartzCore framework and layer.shadow.
Upvotes: 1