Wednesday, August 17, 2011

Modifying Actionsheets

Thankyou MrAppleHead


// Instantiate once within a method
if (self.actionSheet==nil) {
UIActionSheet *as = [[UIActionSheet alloc]
initWithTitle:@""
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:@"Load Data"
otherButtonTitles:@"Update Data",nil];

//[actionSheet showInView:self.view];
self.loadUIButton.frame = CGRectMake(24.0f,25.0f,275.f,46.0f);
[as addSubview: self.loadUIButton];
self.updateUIButton.frame = CGRectMake(24.0f,78.0f,275.f,46.0f);
[as addSubview: self.updateUIButton];
//[actionSheet addSubview: self.cancelUIButton];
//[as showFromToolbar: self.navigationController.toolbar];
self.actionSheet = as;
[as release];
}
[self.actionSheet showFromToolbar: self.navigationController.toolbar];
NOTE: This worked perfectly in a previous app I built.

No comments:

Post a Comment