Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Added images to readme file, color is now applied to navigation bar t…
Browse files Browse the repository at this point in the history
…itle. (this is v1.6)
  • Loading branch information
lucamozzarelli committed Apr 12, 2017
1 parent c0c60d5 commit 0b88bab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions LMArticleViewController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|


s.name = "LMArticleViewController"
s.version = "1.5"
s.version = "1.6"
s.summary = "An Objective-C subclass of UIViewController inspired by Apple News"
s.description = "This subclass of UIViewController provides an article view controller with one top image, title, date, author and body labels."

Expand All @@ -14,7 +14,7 @@ Pod::Spec.new do |s|

s.platform = :ios, "9.0"

s.source = { :git => "https://github.com/lucamozza/LMArticleViewController.git", :tag => 'v1.5'}
s.source = { :git => "https://github.com/lucamozza/LMArticleViewController.git", :tag => 'v1.6'}

s.source_files = "LMArticleViewController", "LMArticleViewController/**/*.{h,m}"
# s.exclude_files = "Classes/Exclude"
Expand Down
8 changes: 5 additions & 3 deletions LMArticleViewController/LMArticleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ - (void)setNavBarAutoColored:(BOOL)navBarAutoColored {
SLColorArt *colorArt = [self.image colorArt];
self.navigationController.navigationBar.tintColor = colorArt.secondaryColor;
self.navigationController.navigationBar.barTintColor = colorArt.backgroundColor;
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSForegroundColorAttributeName:colorArt.secondaryColor}];
}
}
- (void)setImage:(UIImage *)image {
Expand All @@ -300,10 +302,10 @@ - (void)setImage:(UIImage *)image {
}

if ( self.navBarAutoColored ) {
self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
self.navigationController.navigationBar.tintColor = colorArt.secondaryColor;
self.navigationController.navigationBar.barTintColor = colorArt.backgroundColor;
self.navigationController.navigationBar.tintColor = colorArt.secondaryColor;
[self.navigationController.navigationBar setTitleTextAttributes:
@{NSForegroundColorAttributeName:colorArt.secondaryColor}];
}

}
Expand Down
Binary file modified img-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b88bab

Please sign in to comment.