今天试用The Amazing Audio Engine,发现两者共存的方式,试验过是正常
引用
If you're including source files directly within your ARC-enabled project, please note: The Amazing Audio Engine does not use ARC. Why? Because its origins are pre-ARC, and because much of The Engine is written in C for performance reasons so there isn't a great benefit from porting to ARC. This means if you include the source files of The Amazing Audio Engine directly into your ARC-enabled project, you'll need to add the -fno-objc-arc flag to the build parameters for each source file, which you can do by opening the "Build Phases" tab of your app target, opening the "Compile Sources" section, and double-clicking in the "Compiler Flags" column of the relevant source files.


所以,如果在ARC项目里用non-ARC的代码,都得这样处理了啦

参考配图:
点击在新窗口中浏览此图片

注意,5.0的界面如果右侧栏打开了,可能看不到这一栏,收起来应该就可以看到
我都疑惑了很久才发现
        _player.completionBlock = ^{
            [self stopPlay];
        };


上面在block里用self是会有提示:
Capturing 'self' strongly in this block is likely to lead to a retain cycle

可以这样改一下

        __weak typeof(self) weakSelf = self;
        _player.completionBlock = ^{
            [weakSelf stopPlay];
        };


参考自:http://stackoverflow.com/questions/14556605/capturing-self-strongly-in-this-block-is-likely-to-lead-to-a-retain-cycle
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]

阅读推荐

服务器相关推荐

开发相关推荐

应用软件推荐