使用ELCImagePickerController选择图像

时间:2013-02-26 09:09:35

标签: objective-c

我正在尝试使用ELCImagePickerController,它有效,但我有一些我想改变的事情。

  1. 我希望它能够立即向我展示主要专辑的图像矩阵,而无需挑选专辑和内容。只需显示一个矩阵,并带有done按钮。现在它可以让你先选择一个专辑。

  2. 我无法理解保存的所选图片到底在哪里?

  3. 如何更改按钮canceldone图片?

  4. 这是我如何添加它(到cocos2d场景)

     albumController = [[ELCAlbumPickerController alloc] initWithNibName:@"ELCAlbumPickerController" bundle:[NSBundle mainBundle]];
           elcPicker = [[ELCImagePickerController alloc] initWithRootViewController:albumController];
           [albumController setParent:elcPicker];
           [elcPicker setDelegate:self];
           [[[CCDirector sharedDirector] view] addSubview:elcPicker.view];
    

    这是完成按钮:

    - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info
    
    
    
    {
        //[self removeFromParentAndCleanup:YES];
    
    
        for (UIView *v in [scrollview subviews])
        {
            [v removeFromSuperview];
        }
    
        CGRect workingFrame = scrollview.frame;
        workingFrame.origin.x = 0;
    
        for(NSDictionary *dict in info)
        {
    
            UIImageView *imageview = [[UIImageView alloc] initWithImage:[dict objectForKey:UIImagePickerControllerOriginalImage]];
            [imageview setContentMode:UIViewContentModeScaleAspectFit];
            imageview.frame = workingFrame;
    
            [scrollview addSubview:imageview];
            [imageview release];
    
            workingFrame.origin.x = workingFrame.origin.x + workingFrame.size.width;
        }
    
        [scrollview setPagingEnabled:YES];
        [scrollview setContentSize:CGSizeMake(workingFrame.origin.x, workingFrame.size.height)];
    }
    

0 个答案:

没有答案