Wednesday, 14 December 2011

Action Sheet Code and Dismiss with buttonIndex-iPhone

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Facebook?"
                                                             delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"OK" otherButtonTitles:nil];
    actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
    [actionSheet showFromTabBar:self.tabBarController.tabBar];
    [actionSheet release];  


- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
    if(buttonIndex==0){
        [self sendMail];
    }
    else if(buttonIndex == 1){
       
        NSLog(@"CLLLLL");

}
}

No comments:

Post a Comment