code:
-(nsurl*)loaddocument:(nsstring*)docname docextension:(nsstring*)docext { nsstring *path = [[nsbundle mainbundle] pathforresource:docname oftype:docext]; return [nsurl fileurlwithpath:path]; } code:
- (ibaction)toolbaractionbuttonpressed:(id)sender { uidocumentinteractioncontroller *dicontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:[self loaddocument:[currentcontent objectforkey:@"docname"] docextension:[currentcontent objectforkey:@"docextension"]]]; [dicontroller presentopeninmenufrombarbuttonitem:sender animated:yes]; } when pressing toolbaractionbutton, action sheet presents 1 or more buttons, depending on device app running on (and if apps support document installed). instance, on primary device, options open in ibooks, adobe reader, , kindle app appear.
however, when select of these action sheet index buttons, action sheet dismisses , nothing happens.
delegate method need implement working? understand following delegate method candidate, how call application identifiers?
code:
- (void) documentinteractioncontroller: (uidocumentinteractioncontroller *) controller willbeginsendingtoapplication: (nsstring *) application { }
have looked @ apple's docinteraction sample code?
fwiw, use docinteraction lot send files app i'm working on. in sim, reason, docinteraction stops working after 1 or 2 tries. app running in background. choose file , chose open in app , nothing happens. fix have restart app or entire sim. haven't been able figure out actual problem sounds similar description.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment