Skip to content

Commit

Permalink
Update to 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EnderTan authored and EnderTan committed Mar 9, 2017
1 parent 3da5769 commit a73aae2
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ETNavBarTransparent.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = 'ETNavBarTransparent'
s.version = '1.0.3'
s.version = '1.0.4'
s.license = 'MIT'
s.summary = 'Change NavigationBar‘s transparency at pop gestrue and other situation'
s.homepage = 'https://github.com/EnderTan/ETNavBarTransparent'
s.author = { 'Ender Tan' => '[email protected]' }
s.social_media_url = 'http://weibo.com/endertan'
s.source = { :git => 'https://github.com/EnderTan/ETNavBarTransparent.git', :tag => '1.0.3' }
s.source = { :git => 'https://github.com/EnderTan/ETNavBarTransparent.git', :tag => '1.0.4' }
s.platform = :ios, '8.0'
s.source_files = 'ETNavBarTransparent','ETNavBarTransparent/**/*'
s.requires_arc = true
Expand Down
9 changes: 7 additions & 2 deletions ETNavBarTransparent/ETNavBarTransparent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ extension UINavigationController {

fileprivate func setNeedsNavigationBackground(alpha:CGFloat) {
let barBackgroundView = navigationBar.value(forKey: "_barBackgroundView") as AnyObject
let backgroundImageView = barBackgroundView.value(forKey: "_backgroundImageView") as? UIImageView
if navigationBar.isTranslucent {
if let backgroundEffectView = barBackgroundView.value(forKey: "_backgroundEffectView") as? UIView {
backgroundEffectView.alpha = alpha
if backgroundImageView != nil && backgroundImageView!.image != nil {
(barBackgroundView as! UIView).alpha = alpha
}else{
if let backgroundEffectView = barBackgroundView.value(forKey: "_backgroundEffectView") as? UIView {
backgroundEffectView.alpha = alpha
}
}
}else{
(barBackgroundView as! UIView).alpha = alpha
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "9715683_125231552141_2.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ extension UINavigationController {

fileprivate func setNeedsNavigationBackground(alpha:CGFloat) {
let barBackgroundView = navigationBar.value(forKey: "_barBackgroundView") as AnyObject
let backgroundImageView = barBackgroundView.value(forKey: "_backgroundImageView") as? UIImageView
if navigationBar.isTranslucent {
if let backgroundEffectView = barBackgroundView.value(forKey: "_backgroundEffectView") as? UIView {
backgroundEffectView.alpha = alpha
if backgroundImageView != nil && backgroundImageView!.image != nil {
(barBackgroundView as! UIView).alpha = alpha
}else{
if let backgroundEffectView = barBackgroundView.value(forKey: "_backgroundEffectView") as? UIView {
backgroundEffectView.alpha = alpha
}
}
}else{
(barBackgroundView as! UIView).alpha = alpha
Expand Down

0 comments on commit a73aae2

Please sign in to comment.