zoukankan      html  css  js  c++  java
  • 第4月第2天 nsinvocation崩溃 mvc videotrack

    1.

            __unsafe_unretained id result = nil;
            [invocation getReturnValue:&result];
            return result;

     

     

    http://www.jianshu.com/p/ab6131ac7e70

    http://www.cocoachina.com/bbs/read.php?tid=197684

    2.

    一个uiviewcontroller包含一个uitableview,那么viewcontroller必须要实现uitableview的datasource。如果uitableviewcell有多个,并且每一种类型最好分离出来。那么uiviewcontroller可以使用nsdictionary包含多个logic类,通过类型找到logic类,在logic类实现cellForRowAtIndexPath逻辑。

    这样一个uiviewcontroller有多个logic类处理uitableview的细节。

    一个uiviewcontroller需要调用多个接口获取网络数据,就有多个 发送请求,解析数据 。发送请求,解析数据可以放在一个类里,放在单例里也可以,只是会导致这个单例膨胀。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

    3.

        videoTrack = [[qxTrack alloc] initWithTrackType:eMT_Video];
        
        for (BaseView *baseView in  toolBar.itemArray) {
            ALAsset *asset = baseView.item.asset;
            qxMediaObject *mediaObj = [[qxMediaObject alloc] init];
            int type = eMT_Video;
            if([asset valueForProperty:ALAssetPropertyType] == ALAssetTypePhoto){
                type = eMT_Photo;
            }
            
            NSURL *url = [asset valueForProperty:ALAssetPropertyAssetURL];
            [mediaObj setFilePath:[url absoluteString] withType:type fromAssetLibrary:YES];
            
            if(type == eMT_Photo){
                [mediaObj setDuration:3000];
            }
            [videoTrack addMediaObject:mediaObj];
        }
        [timeline addTrack:videoTrack];//0
        [timeline addTrack:musicTrack];//1
        [timeline addTrack:audioTrack];//2
        [timeline addTrack:overlayTrack];//3
  • 相关阅读:
    MySQL CREATE EVENT创建任务计划 定时执行任务
    MYSQL 的一些基本操作
    PHP mktime() 函数
    php格式化数字:位数不足前面加0补足
    浅析大数据量高并发的数据库优化
    使用SquirrelMQ打造一个千万级数据更新量的应用
    MySQL行锁深入研究
    MySQL 学习笔记 一
    利用C#操作配置文件(转)
    每个分类取最新的几条的SQL实现(转载记录)
  • 原文地址:https://www.cnblogs.com/javastart/p/6242048.html
Copyright © 2011-2022 走看看