English 中文(简体)
页: 1
原标题:NSString In AQGridViewCell

我有一份<代码>AQGridView,用于在文件目录中显示档案以及预先确定并装入表格的其他4份文件。 我需要知道,我如何能够将文件URL(即,甚至预先界定的文件)设为牢房。 以上均为<条码>。 因此,可以在稍后时间提出

- (void)gridView:(AQGridView *)gridView didSelectItemAtIndex:(NSUInteger)index { 
    NSString *fileURL = [self._icons objectAtIndex:index]; 
    // do stuff
}

并装入一种新观点,采用“条码”-(id)init方法。 如今,一份文件目录的 回到了(NUL)SIGABRT


放弃。 我认为,这意味着我可以要求一点质量。 《法典》将非常伟大。

可根据要求颁布法律。

EDIT WorkingING CODE:

//.h    
NSMutableArray *_documentIconsURLs;

//.m
//viewDidLoad
 // array for internal and external document URLs
    self._documentIconsURLs = [NSMutableArray array];
        _documentIconsURLs = [[NSMutableArray alloc] initWithObjects:@"Musette.pdf",
                              @"Minore.pdf",
                              @"Cantata.pdf",
                              @"Finalé.pdf",
                              @"divine-comedy-inferno.pdf", nil];
//didSelectObject
- (void) gridView:(AQGridView *)gridView didSelectItemAtIndex:(NSUInteger)index {

    NSLog (@"Selected theArgument=%d
", index);

    UIViewController *viewController = [[[UIViewController alloc]init]autorelease];
    {
        //if file is built-in, read from the bundle
        if (index <= 4)
        {
            // first section is our build-in documents
            NSString *fileURLs = [_documentIconsURLs objectAtIndex:index];
            NSLog(@"%@", fileURLs);
            viewController = [[[viewController alloc]initWithContentURL:fileURLs]autorelease];
        }
最佳回答
问题回答

暂无回答




相关问题
How do you create UIBarButtonItems with a radio interface?

I have a UIToolbar that needs three buttons in a radio style, meaning that of the three, only one button can be pushed at a time. The documentation makes reference to the possibility of setting up ...

iPhone settings bundle

I want to allow the user to enter a valid date using the iPhone’s settings application. I have experimented with many of the PreferenceSpecifiers data node types including date. I have two issues: ...

Circular #import/@class problem in ObjectiveC

I m going to use an example to properly illustrate my confusion. I can t quite wrap my head around this. In Cocoa touch, we have UIViewController and its subclass, UINavigationController. Now, UIVC ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Cocoa-Touch: issue looping MPMoviePlayerController

I have an app which has to load some data at startup, so I want to display a splash-screen animation. I m using the MPMoviePlayerController to play a m4v file. The movie has it s background set to [...

Iphone sequential animation with setAnimationDelay

I m trying to chain animation events. The application I m coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "...

热门标签