• 第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
  • 相关阅读:
    寒假作业(二)
    关于寒假的自学计划
    关于Markdown格式转PDF格式
    关于‘1001.A+B Format (20)’的解题报告
    第一次撰写博客——一切的一切才刚刚开始
    第八章 Django框架——ORM介绍之多表操作
    第七章 Django框架——ORM介绍之单表操作
    第六章 Django框架——ORM介绍之创建表
    第五章 Django框架——模板层Templates
    第四章 Django框架——视图层views
  • 原文地址:https://www.cnblogs.com/javastart/p/6242048.html
Copyright © 2020-2023  润新知