Skip to content

Instantly share code, notes, and snippets.

-(void)showSignatureBoxFromButton:(UIButton*)fromButton {
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
PESignatureViewController *vc = [sb instantiateViewControllerWithIdentifier:@"signatureCapture"];
vc.delegate = self;
UIPopoverController* aPopover = [[UIPopoverController alloc]
initWithContentViewController:vc];
// Store the popover in a custom property for later use.
self.myPopoverController = aPopover;
@lordbron
lordbron / gist:6923497
Last active December 25, 2015 05:19
the binding in serialization
Serialization in parent component:
"pagePanel": {
"prototype": "montage/ui/repetition.reel",
"properties": {
"element": {
"#": "pagePanel"
},
"isSelectionEnabled": false,
"contentController": {"@": "panelItems"},
"axis": "vertical"
@lordbron
lordbron / gist:5219015
Created March 22, 2013 04:52
I know each editField in the repetition will call the same setter on modifiedRowData and that's fine. My handler takes the incoming data and handles it appropriately.
"editField": {
"prototype": "ui/edit-field.reel",
"properties": {
"element": {"#": "repeatedEditField"}
},
"bindings": {
"data": {"<-": "@dataFieldRepetition.objectAtCurrentIteration"},
"outgoingData": {"->": "@owner.modifiedRowData"}
}
},
@lordbron
lordbron / gist:5215670
Created March 21, 2013 18:57
Weird case where a setter on a binding is not being fired when binding to an object, but does fire when bound to one of its properties.
Fires the setter:
"sampleComponent": {
"prototype": "ui/sample-component.reel",
"properties": {
"element": {"#": "sampleComponent"}
},
"bindings": {
"contentController": {"<-": "@randomItems.content"}
}
},