adding view into action sheet

前端 未结 3 1559
-上瘾入骨i
-上瘾入骨i 2021-01-06 19:30

Can I add my custom UIViewController into the ActionSheet ?

thanks

3条回答
  •  甜味超标
    2021-01-06 20:02

    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];
    

提交回复
热议问题