Permalink
Browse files

Made the title, published, and source optional

  • Loading branch information...
1 parent 5ab3ab4 commit 6cc950516c0fe27548f50a5248c85cbb9380baec @burtlo committed Apr 20, 2012
Showing with 13 additions and 3 deletions.
  1. +13 −3 EGOPhotoViewer/Views/EGOPhotoCaptionView/EGODetailedCaptionView.m
@@ -187,10 +187,20 @@ - (void)setPhoto:(id<EGOPhoto>)photo {
[self layoutDefaultPositions];
- [self setTitleText:photo.title];
+
+ if ([photo respondsToSelector:@selector(title)]) {
+ [self setTitleText:photo.title];
+ }
+
[self setCaptionText:photo.caption];
- [self setPublishedText:photo.published];
- [self setSourceText:photo.source];
+
+ if ([photo respondsToSelector:@selector(published)]) {
+ [self setPublishedText:photo.published];
+ }
+
+ if ([photo respondsToSelector:@selector(source)]) {
+ [self setSourceText:photo.source];
+ }
[self recalculateSize];

0 comments on commit 6cc9505

Please sign in to comment.