Skip to content

Commit

Permalink
Merge pull request #6064 from cheekiatng/TIMOB-17670-3_4_X
Browse files Browse the repository at this point in the history
[TIMOB-17670](3_4_X) DocumentViewer not displaying PDF files
  • Loading branch information
jonalter committed Sep 12, 2014
2 parents 9c0a6e4 + 4dbfb3b commit 284a6cf
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions iphone/Classes/TiUIiOSDocumentViewerProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ -(void)setUrl:(id)value
{
ENSURE_TYPE(value,NSString);
NSURL *url = [TiUtils toURL:value proxy:self];
if (controller!=nil)
{
[self controller].URL = url;
}
else
{
[self replaceValue:url forKey:@"url" notification:NO];
}

//UIDocumenactionController is recommended to be a new instance for every different url
//instead of having titanium developer create a new instance every time a new document url is loaded
//we assume that setUrl is called to change doc, so we go ahead and release the controller and create
//a new one when asked to present
RELEASE_TO_NIL(controller);
[self replaceValue:url forKey:@"url" notification:NO];
}

-(id)icons
Expand Down

0 comments on commit 284a6cf

Please sign in to comment.