2011-09-23 74 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

相關問題