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

Support for iOS11/12, optional text label with image description #12

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Hide description label background overlay if no description text for …
…image.

Fix deprecation warning.
  • Loading branch information
xjki committed Mar 5, 2021
commit 0b7cd8dd97819691cec72347551c95def6cebd4b
2 changes: 1 addition & 1 deletion RMGallery/RMGalleryCell.m
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ - (void)setImage:(UIImage *)image
- (void) setTextDescription:(NSString *)text{
_textDescription = text;
self.descriptionLabel.text = text;
self.descriptionLabel.hidden = (!text || [text isEqualToString:@""]);
self.descriptionLabel.hidden = self.descriptionBackground.hidden = (!text || [text isEqualToString:@""]);
}

- (void)setImage:(UIImage *)image inSize:(CGSize)imageSize
2 changes: 1 addition & 1 deletion RMGallery/RMGalleryViewController.m
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- (void)viewDidLoad
{
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
_galleryView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
_galleryView.frame = self.view.bounds;
_galleryView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.view addSubview:_galleryView];