// Close
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:[[I18n sharedInstance] cancelButton]
style:UIBarButtonSystemItemCancel
target:self
action:@selector(dismissSignatureView:)];
[self.navigationItem setLeftBarButtonItem:closeButton];
[closeButton release];
// Close Button
UIBarButtonItem *eraseButton = [[UIBarButtonItem alloc] initWithTitle:@"Clear"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(eraseSignature:)];
[self.navigationItem setLeftBarButtonItem:eraseButton];
[eraseButton release];
// Close and Save
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:[[I18n sharedInstance] okButton]
style:UIBarButtonItemStyleBordered
target:self
action:@selector(dismissSignatureViewAndSelect:)];
doneButton.tag = fieldTag;
[self.navigationItem setRightBarButtonItem:doneButton];
[doneButton release];
[self.signatureSheet.navigationBarView setItems:[NSArray arrayWithObjects:closeButton, eraseButton, doneButton, nil]];
[self.signatureSheet viewWillAppear:NO];
答案 0 :(得分:0)
// Close
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:[[I18n sharedInstance] cancelButton]
style:UIBarButtonSystemItemCancel
target:self
action:@selector(dismissSignatureView:)];
[self.navigationItem setLeftBarButtonItem:closeButton];
// Close Button
UIBarButtonItem *eraseButton = [[UIBarButtonItem alloc] initWithTitle:@"Clear"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(eraseSignature:)];
[self.navigationItem setLeftBarButtonItem:eraseButton];
// Close and Save
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:[[I18n sharedInstance] okButton]
style:UIBarButtonItemStyleBordered
target:self
action:@selector(dismissSignatureViewAndSelect:)];
doneButton.tag = fieldTag;
[self.navigationItem setRightBarButtonItem:doneButton];
[self.signatureSheet.navigationBarView setItems:[NSArray arrayWithObjects:closeButton, eraseButton, doneButton, nil]];
[self.signatureSheet viewWillAppear:NO];