2011-09-23 73 views
0

您好我有ImagePickerViewController我需要增加单元格的高度它看起来像tableview和我需要增加imagePickerviewController的单元格高度。如何增加单元格的高度为UIImagePickerViewController

I hope every one can understand my question. 

i am attaching the picture 

enter image description here

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  

    // Override point for customization after application launch. 

    // Add the navigation controller's view to the window and display. 
    UIImagePickerController *albumPicker = [[UIImagePickerController alloc]init]; 
    [albumPicker setDelegate:self]; 
    [albumPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; 
    [albumPicker setContentSizeForViewInPopover:CGSizeMake(300, 700)]; 

    [self.window addSubview:albumPicker.view]; 
    [self.window makeKeyAndVisible]; 

    return YES; 
} 

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { 
    UINavigationItem *ipcNavBarTopItem; 

    // add done button to right side of nav bar 
    UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Photos" 
                    style:UIBarButtonItemStylePlain 
                    target:self 
                    action:@selector(saveImages:)]; 

    UINavigationBar *bar = navigationController.navigationBar; 
    [bar setHidden:NO]; 
    ipcNavBarTopItem = bar.topItem; 
    ipcNavBarTopItem.title = @"Photos"; 
    ipcNavBarTopItem.rightBarButtonItem = doneButton; 
} 

对于给定的图片这是一个UIImagePicker,我需要增加其细胞的高度。

我试试我的运气。谁能帮我吗。

回答

0

这显然是UITableView。所有单元格的高度可以在UITableView的rowHeight属性上设置,或者对UITableViewDelegate的heightForRowAtIndexPath方法中的每个单元单独设置。看看你的资源来了解UITableView的设置。

+0

有没有UITableView的我已经在我的代码我刚才打电话UIImagePickerViewController这writen会自动显示的tableview细胞imagepicker – user891268

0

要增加的TableView单元格的高度实现以下方法:

- (CGFloat)tableView:(UITableView *)tv 
    heightForRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    CGFloat height; 
    height = 44; 
    return height; 

} 
+0

感谢它会增加TableView单元格的高度。但我需要增加UIImagePickerViewController的高度如何控制ImagePicker的高度。 ???? – user891268

+0

ImagePicker或单纯显示在单元上的图像? – DShah

+0

显示在Cell上的图像尝试使用所需的高度和宽度设置帧... – DShah

相关问题