This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INKAction *returnAction = [INKAction action:@"Return" type:INKActionType_Return]; | |
[INKCore registerAction:returnAction withBlock:^(INKBlob *blob, NSError *error) { | |
NSLog(@"Return"); | |
//Code to handle the returned blob | |
}]; | |
INKAction *returnCancelAction = [INKAction action:@"ReturnCancel" type:INKActionType_ReturnCancel]; | |
[INKCore registerAction:returnCancelAction withBlock:^(INKBlob *blob, NSError *error) { | |
NSLog(@"Return Cancel"); | |
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[self.view INKEnableWithUTI:myFile.uti dynamicBlob:^INKBlob *{ | |
INKBlob *blob = [INKBlob blobFromData:[myFile getData]]; | |
blob.uti = myFile.uti; | |
blob.filename = myFile.fileName; | |
return blob; | |
} returnBlock:^(INKBlob *blob, INKAction *action, NSError *error) { | |
if ([action.type isEqualToString: INKActionType_Return]) { | |
// Return save action. Save back the blob | |
} else { | |
// Return cancel action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Ink/Ink.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)applicationDidEnterBackground:(UIApplication *)application | |
{ | |
[INKCore runBackgroundProcess]; | |
/*Your code here*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This method is used instead of the handleOpenURL method because it is depreciated in iOS 6 and only one of the methods can be used | |
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { | |
if ([Ink openURL:url sourceApplication:sourceApplication annotation:annotation]) { | |
return YES; | |
} | |
// Add whatever other url handling code your app requires here | |
return NO; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"actions": [ | |
{...}, | |
{...}, | |
{ | |
"id": 2, | |
"uuid": "abcdefg", | |
"name": "Sign in PDFSign", | |
"call_to_action": "Sign", | |
"description": "This will save a file", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <INK/Ink.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[Ink setupWithAppKey:@"your-appkey-here"]; | |
/*Your app's intialization code here*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (loop_cond) { | |
int x = 2; | |
if (x > 1) { | |
x = -5; | |
} | |
print(x); | |
} | |
// If we hoist x = 2, then we'll only print once | |
// If we don't we'll print every time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
thrower() | |
except (Exception1, Exception2): | |
print DoStuff |