【问题标题】:Aviary SDK issue with iOS 5.0 - objectAtIndexedSubscriptiOS 5.0 的 Aviary SDK 问题 - objectAtIndexedSubscript
【发布时间】:2013-04-01 00:04:15
【问题描述】:

我已经下载了最新的 Aviary 代码 2.6.0 并将其合并到我的 Xcode 4.2 中,用于运行 iOS 5.0 的 iPhone 4S。每次我启动 Aviary 操作时,我都会在下面看到 objectAtIndexedSubscript 的回溯显示。

我看到这个帖子“Is objectAtIndexedSubscript available in IOS5?”,iOS 5.0 中没有 objectAtIndexedSubscript。在 Aviary 文档中,它说支持 iOS 5.0。我错过了什么?

所以这是我的问题。有没有人尝试为 iOS 5.0 合并最新的 Aviary 代码版本 2.6.0?如果不是适用于 iOS 5.0 的 Aviary SDK 版本是什么?我在哪里可以下载旧版本的 Aviary SDK。我只是还没准备好迁移到 iOS 6.0。我正在尝试将此错误报告给 Aviary 支持,但我感觉他们会告诉我升级到 iOS 6.0。

来自 Aviary 网站:

运行时要求 SDK 支持的最低 iOS 版本为 iOS 5.0。这种选择的主要原因是我们使用 ARC (自动引用计数)和我们对苹果的一些依赖 需要 iOS 5 的框架和库。”

- (void) launchPhotoEditorWithImage:(UIImage *)editingResImage highResolutionImage:(UIImage *)highResImage
{    

    NSLog(@"launchPhotoEditorWithImage ...");

    // Initialize the photo editor and set its delegate
    AFPhotoEditorController * photoEditor = [[AFPhotoEditorController alloc] initWithImage:editingResImage];
    [photoEditor setDelegate:self];

    NSLog(@"Present photo editor ...");

    // Present the photo editor.
    [self presentViewController:photoEditor animated:YES completion:nil];
}

2013-03-31 19:32:14.953 Photo Editor[348:707] launchPhotoEditorWithImage ...
2013-03-31 19:32:15.421 Photo Editor[348:707] Present photo editor ...
2013-03-31 19:32:15.421 Photo Editor[348:3f03] -[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x4ac5f0
2013-03-31 19:32:15.432 Photo Editor[348:3f03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x4ac5f0'
*** First throw call stack:
(0x36fbe8bf 0x3232e1e5 0x36fc1acb 0x36fc0945 0x36f1b680 0xb1a45 0x32933d55 0x32935dc7 0x32935c5d 0x32936867 0x37f5c1cf 0x37f5c0a4)
terminate called throwing an exception[Switching to process 9987 thread 0x2703]
[Switching to process 9987 thread 0x2703]
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
kill
Current language:  auto; currently objective-c
quit
Program ended with exit code: 0

【问题讨论】:

    标签: iphone ios aviary


    【解决方案1】:

    只需更新到最新的 Xcode。在一些旧版本的 Xcode 中,objectAtIndexedSubscript: 没有在 SDK 中实现。

    【讨论】:

      【解决方案2】:

      添加这个家伙类别(从 gi​​thub 链接获取),它将完美运行

      http://cocoaisland.wordpress.com/2012/08/12/modern-objective-c-part-ii-container-subscripting/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-16
        • 1970-01-01
        • 1970-01-01
        • 2014-06-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多