English 中文(简体)
ELCImagePickerController 不允许进入用户地点
原标题:ELCImagePickerController without allowing access to user location

I used ELCImagePickerController in my app. but when we start our application first time and on Image gallery it will ask for accessing user location , if we don t allow to access user location to it then it will give error in UIAlertView and it wont show image gallery.

但此后,如果我们着手确定“ app”、地点服务、“gt”、[回头换到我们的用具进入地点],则开始使用“&”;去上“ery”一页,“并”;我们可以展示我们的图像。

So my question is how can we show image gallery with ELCImagePickerController with location services turn off for our app or user don t allow to access location to our app. ELCImagePickerController can be downloadable at this LINK

之后发现ESAlbumPicker Controller.m 案卷随后去Ge Did Load,从而在用户地点进入中断时造成错误警示。

    dispatch_async(dispatch_get_main_queue(), ^
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    // Group enumerator Block
    void (^assetGroupEnumerator)(struct ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop) 
    {
        if (group == nil) 
        {
            return;
        }

        [self.assetGroups addObject:group];

        // Keep this line!  w/o it the asset count is broken for some reason.  Makes no sense
        NSLog(@"count: %d", [group numberOfAssets]);

        // Reload albums
        [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES];
    };

    // Group Enumerator Failure Block
    void (^assetGroupEnumberatorFailure)(NSError *) = ^(NSError *error) {

        UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[NSString stringWithFormat:@"Album Error: %@", [error description]] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
        [alert show];
        [alert release];

        NSLog(@"A problem occured %@", [error description]);                                     
    };  

    // Enumerate Albums
    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];        
    [library enumerateGroupsWithTypes:ALAssetsGroupAll
                           usingBlock:assetGroupEnumerator 
                         failureBlock:assetGroupEnumberatorFailure];


    [library release];
    [pool release];
});    
最佳回答

The answer is that you can t show the image gallery with ELCImagePickerController with location services turned off.

ELCImagePickerController uses the Assets Library Framework to access the device s photo album. Because this framework also gives access to the metadata of the photos - including location data - the user needs to grant permission for the app to use Location Services.

除你使用标准通用主计长(但我假定,得票符合贵方的要求)外,别无选择。

问题回答

暂无回答




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签