今天试用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 提示打不开,显示一个提示层,点击右上角按钮,在safari里打开
2 使用跳转地址

研究了最美应用,他们就是从第一个方式转换到第二个方式
里面的诀窍是,使用微信的跳转地址

比如:
http://mp.weixin.qq.com/mp/redirect?url=https://itunes.apple.com/cn/app/id585901876

微信应该是会控制一部分app不能跳转吧,或者以后做个广告什么的?
- (IBAction)myAction:(UIButton *)sender forEvent:(UIEvent *)event {
    NSSet *touches = [event touchesForView:sender];
    UITouch *touch = [touches anyObject];
    CGPoint touchPoint = [touch locationInView:sender];
    NSLog(@"%@", NSStringFromCGPoint(touchPoint));
}


参考自:http://stackoverflow.com/q...
我尝试的是如下可以解决:

在viewcontroller里加上这个即可,后面的都不需要

-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent;
}


and call this method from view did load like this

if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0f)
    {
       [self setNeedsStatusBarAppearanceUpdate];
    }
分页: 8/26 第一页 上页 3 4 5 6 7 8 9 10 11 12 下页 最后页 [ 显示模式: 摘要 | 列表 ]

阅读推荐

服务器相关推荐

开发相关推荐

应用软件推荐