iOS随记

ios 10 访问设置问题

从ios8之api支持访问设置通过访问UIApplicationOpenSettingsURLString来跳转设置

 NSURL*url=[NSURL URLWithString:UIApplicationOpenSettingsURLString];
    if( [[UIApplication sharedApplication]canOpenURL:url] ) {
        [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL success) {
            
        }];
    }
    

但是如果直接这样设置会闪退,原因是因为没有开启某项权限,只有开启权限后才能正常跳转所以需要自己稍作处理。

gitbook

https://git-scm.com/book/zh/v1/Git-%E5%9F%BA%E7%A1%80-%E8%BF%9C%E7%A8%8B%E4%BB%93%E5%BA%93%E7%9A%84%E4%BD%BF%E7%94%A8

删除tag

git tag -d

git push origin :refs/tags/

Masonry

Aspect retio

            make.width.equalTo(_drawView.mas_height).multipliedBy(width);

pod

target 'JspatchPro' do
pod 'JSPatchPlatform'
end

pod install 出现 Include of non-modular header inside framework module 解决方法 先把出现问题的pod 删除 执行 pod install 然后在写入 再次 pod install解决

pod repo update 更新远程pod

资源

http://blog.cnbang.net/archives/

制作动态库

新建工程frameWork 真机模拟器分别编译

合并framework中的库

lipo -create 真机 模拟机 路径 -output 路径

lipo -info 路径 查看信息

ios 音视频被打断通过设置AVAudioSessionInterruptionNotification来监听


 [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(handleAudioSessionInterruption:)
                                                 name:AVAudioSessionInterruptionNotification
                                               object:nil];


- (void)handleAudioSessionInterruption:(NSNotification*)notification {
    __weak typeof(self)weakSelf = self;

    NSNumber *interruptionType = [[notification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey];
    NSNumber *interruptionOption = [[notification userInfo] objectForKey:AVAudioSessionInterruptionOptionKey];
    
    
    switch (interruptionType.unsignedIntegerValue) {
        case AVAudioSessionInterruptionTypeBegan:{
            // • Audio has stopped, already inactive
            // • Change state of UI, etc., to reflect non-playing state
            [weakSelf leaveStreaming];

        } break;
        case AVAudioSessionInterruptionTypeEnded:{
            // • Make session active
            // • Update user interface
            // • AVAudioSessionInterruptionOptionShouldResume option
            if (interruptionOption.unsignedIntegerValue == AVAudioSessionInterruptionOptionShouldResume) {
                // Here you should continue playback.
                [[AVAudioSession sharedInstance] setActive:YES error:nil];
              
             }
        } break;
        default:
            break;
    }
}

开启itunnes 共享

Application supports iTunes file sharing YES

苹果文档

https://developer.apple.com/library/content/navigation/#section=Resource%20Types&topic=Guides

转载于:https://www.cnblogs.com/keyan1102/p/7197767.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值