iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
holonunu
V2EX  ›  iDev

求助建立 ID 映射关系方案

  •  
  •   holonunu · Dec 28, 2017 · 4310 views
    This topic created in 3207 days ago, the information mentioned may be changed or developed.

    假设有 NSArray<VideoModel *> *videos;

    VideoModel {

    uint videoId,
    
    VideoType type, // 枚举
    
    String name
    

    }

    三种业务场景分别需要频繁通过 videoId 查询:

    • 对应的 video 是否存在
    • 对应的 type
    • 对应的 VideoModel

    这种映射关系,应该如何创建呢?

    目前的方案是 用 NSDictionary 建立<videoId, VideoMoel>的关系,有更好的办法吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:02 · PVG 23:02 · LAX 08:02 · JFK 11:02
    ♥ Do have faith in what you're doing.