UIActionSheet With PickerView not showing up in iPad
        Posted  
        
            by 
                user717452
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user717452
        
        
        
        Published on 2013-07-02T17:03:05Z
        Indexed on 
            2013/07/02
            17:05 UTC
        
        
        Read the original article
        Hit count: 371
        
I am using the following code to add an actionsheet with a picker view on it to my app. From the iPhone, it displays perfectly, but when viewing on iPad (Universal app), it shows a very small pickerview with none of the other buttons right on the center of the page.
UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"Select Chapter"
                                                      delegate:self
                                             cancelButtonTitle:@"Cancel"
                                        destructiveButtonTitle:@"Select"
                                             otherButtonTitles:nil];
    // Add the picker
    UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0,185,0,0)];
    pickerView.delegate = self;
    pickerView.showsSelectionIndicator = YES;    // note this is default to NO
    [menu addSubview:pickerView];
    [menu showFromTabBar:self.tabBarController.tabBar];
    [menu setBounds:CGRectMake(0,0,320, 700)];
    [pickerView release];
    [menu release];
        © Stack Overflow or respective owner