Skip to content

Commit

Permalink
check if contentView is MKMapView using NSClassFromString to prevent …
Browse files Browse the repository at this point in the history
…compiler error if user do not use MKMapVIew
  • Loading branch information
honcheng committed Nov 23, 2012
1 parent 2aad944 commit 21f2fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PaperFold/PaperFold/PaperFold/MultiFoldView.m
Expand Up @@ -85,7 +85,7 @@ - (id)initWithFrame:(CGRect)frame folds:(int)folds pullFactor:(float)factor

- (void)setContent:(UIView *)contentView
{
if ([contentView isKindOfClass:[MKMapView class]]) _shouldTakeScreenshotBeforeUnfolding = YES;
if ([contentView isKindOfClass:NSClassFromString(@"MKMapView")]) _shouldTakeScreenshotBeforeUnfolding = YES;

// set the content view
self.contentViewHolder = [[UIView alloc] initWithFrame:CGRectMake(0,0,contentView.frame.size.width,contentView.frame.size.height)];
Expand Down

0 comments on commit 21f2fb1

Please sign in to comment.