Search code examples
iphoneuiactionsheet

adding view into action sheet


Can I add my custom UIViewController into the ActionSheet ?

thanks


Solution

  • finally I've find it... I've added a view which is subclass of UIViewController into the UIActionSheet. I've created a view in separate file (using xib) .

    UIActionSheet *asheet = [[UIActionSheet alloc] init];
    [asheet showInView:self.view]; 
    [asheet setFrame:CGRectMake(0, 230, 320, 230)];
    
    
    CustomView *innerView = [[CustomView alloc] initWithNibName:@"CustomView" bundle:nil];
    innerView.view.frame = CGRectMake(0, 10, 320, 210);
    [asheet addSubview:innerView.view];
    //[asheet addSubview:innerView];
    
    [innerView release];
    [asheet release];