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
  • 相关阅读:
    HTML链接/实施CSS的三种方法
    XML之Well-Formed文档规则
    【摘】SVN提交与版本冲突
    Web开发之404小结
    TCP 连接的要点
    [转] Epoll 相对Poll和Select的优点
    [转] 剖析 epoll ET/LT 触发方式的性能差异误解(定性分析)
    GDB调试技巧
    [转] 关于c++的头文件依赖
    [转] Linux中gcc,g++常用编译选项
  • 原文地址:https://www.cnblogs.com/javastart/p/6242048.html
Copyright © 2011-2022 走看看