Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect of usage of image assets in framework #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ pod 'EvernoteSDK', '~> 3.0'

Drag & Drop `evernote-sdk-ios.xcodeproj` into your project.

Now open your target's `Build Phases` and add the following items to your `Link Binary With Libraries` section:
Now open your target's `Build Phases` and add the following items to your `Embed Frameworks` section:

- EvernoteSDKiOS.framework

and add the following items to your `Link Binary With Libraries` section:

- MobileCoreServices.framework
- libxml2.dylib

Expand Down
2 changes: 1 addition & 1 deletion evernote-sdk-ios/ENSDK/Private/ENNotebookCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier
[self setSeparatorInset:UIEdgeInsetsMake(0.0, kCellInsetLeft, 0.0, 0.0)];
self.checkButton = [[UIButton alloc] init];
[self.contentView addSubview:self.checkButton];
[self.checkButton setImage:[[UIImage imageNamed:@"ENSDKResources.bundle/ENCheckIcon"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
[self.checkButton setImage:[[UIImage imageNamed:@"ENSDKResources.bundle/ENCheckIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
[self.checkButton sizeToFit];
[self.checkButton setTintColor:[ENTheme defaultTintColor]];
[self.checkButton setCenter:CGPointMake(0.6 * kCellInsetLeft, CGRectGetMidY(self.bounds) + 1.0)];
Expand Down
2 changes: 1 addition & 1 deletion evernote-sdk-ios/ENSDK/Private/ENNotebookTypeView.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (id)initWithFrame:(CGRect)frame

- (void)setIsBusiness:(BOOL)isBusiness {
_isBusiness = isBusiness;
UIImage* notebookTypeIcon = isBusiness? [UIImage imageNamed:@"ENSDKResources.bundle/ENBusinessIcon"] : [UIImage imageNamed:@"ENSDKResources.bundle/ENMultiplePeopleIcon"];
UIImage* notebookTypeIcon = isBusiness? [UIImage imageNamed:@"ENSDKResources.bundle/ENBusinessIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil] : [UIImage imageNamed:@"ENSDKResources.bundle/ENMultiplePeopleIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
_imageView.image = [notebookTypeIcon imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[_imageView sizeToFit];
[self updateNotebookTypeIconColor];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (id)initWithFrame:(CGRect)frame
// Initialization code
self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;

UIImage *dislosureImage = [[UIImage imageNamed:@"ENSDKResources.bundle/ENNextIcon"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImage *dislosureImage = [[UIImage imageNamed:@"ENSDKResources.bundle/ENNextIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
self.discloureIndicator = [[UIImageView alloc] initWithImage:dislosureImage];
[self.discloureIndicator setTintColor:[UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1]];

Expand All @@ -65,7 +65,7 @@ - (void)setIsBusinessNotebook:(BOOL)isBusinessNotebook {
if (_isBusinessNotebook == isBusinessNotebook) return;
_isBusinessNotebook = isBusinessNotebook;
if (_isBusinessNotebook) {
[self setImage:[[UIImage imageNamed:@"ENSDKResources.bundle/ENBusinessIcon"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
[self setImage:[[UIImage imageNamed:@"ENSDKResources.bundle/ENBusinessIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
} else {
[self setImage:nil forState:UIControlStateNormal];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ - (NSString *)activityTitle

- (UIImage *)activityImage
{
return [UIImage imageNamed:@"ENSDKResources.bundle/ENActivityIcon"];
return [UIImage imageNamed:@"ENSDKResources.bundle/ENActivityIcon" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
}

- (BOOL)canPerformWithActivityItems:(NSArray *)activityItems
Expand Down