Pixate / pixate-freestyle-ios

Pixate Freestyle for iOS
Apache License 2.0
848 stars 134 forks source link

Not transparent background UINavigationBar in iOS7.1 #77

Closed iWeaverMan closed 10 years ago

iWeaverMan commented 10 years ago

nav {

background-image: linear-gradient(rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.1) 80%, rgba(255, 255, 255, 0.0) 100%);
shadow: none;
color            : white;
selected-color   : white;
-ios-tint-color  : white;

}

iWeaverMan commented 10 years ago

Wouldn't it be better to set the background image to PXImageUtils.clearPixel and add an image layer for background?

pcolton commented 10 years ago

I'm not sure what the question is. You want to set an image on your nav bar that has some alpha? Here's your css with a red bar behind it.

screen shot 2014-03-11 at 9 05 28 am

iWeaverMan commented 10 years ago

Test in 7.0, background no bottom border...

pcolton commented 10 years ago

Here's the same app on a 7.0 device. Are you saying on 7.1 it has a hard edge but does not on 7.0?

screenshot 2014 03 11 09 46 38

pcolton commented 10 years ago

It looks like you may have to specify the height under 7.1:

background-size: 320 64;

screen shot 2014-03-11 at 9 54 19 am

iWeaverMan commented 10 years ago

Bottom border alpha 0.. In 7.1 not full transparent

iWeaverMan commented 10 years ago

/ New behavior on iOS 7. Default is YES. You may force an opaque background by setting the property to NO. If the navigation bar has a custom background image, the default is inferred from the alpha values of the image—YES if it has any pixel with alpha < 1.0 If you send setTranslucent:YES to a bar with an opaque custom background image it will apply a system opacity less than 1.0 to the image. If you send setTranslucent:NO to a bar with a translucent custom background image it will provide an opaque background for the image using the bar's barTintColor if defined, or black for UIBarStyleBlack or white for UIBarStyleDefault if barTintColor is nil. /

pcolton commented 10 years ago

Did you set the background-size, seems to work for me per my previous post.

iWeaverMan commented 10 years ago

setting background-size: 1 44; makes everything work just fine. However, if a background image size is equal to a component's size, in iOS7.1 an "additional background" is added.