0

我正在尝试使用ELCImagePickerController,它可以工作,但我有一些我想改变的东西。

  1. 我希望它立即向我显示主专辑中的图像矩阵,而无需选择专辑和其他东西。只需显示一个带有done按钮的矩阵。现在它可以让你先选择一张专辑。

  2. 我不明白挑选的图像到底保存在哪里?

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

这就是我添加它的方式(到 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)];
}
4

0 回答 0