• 请不要在回答技术问题时复制粘贴 AI 生成的内容
helloword001
V2EX  ›  程序员

在 Objective-c 中如何创建一个抽象类?

  •  
  •   helloword001 · May 16, 2016 · 3617 views
    This topic created in 3650 days ago, the information mentioned may be changed or developed.
    6 replies    2016-05-17 10:03:19 +08:00
    helloword001
        1
    helloword001  
    OP
       May 16, 2016
    ??????
    Artail
        2
    Artail  
       May 16, 2016 via Android
    OC 没有抽象类。。
    juxingzhutou
        3
    juxingzhutou  
       May 16, 2016
    init 方法里抛出异常
    xingzhela
        4
    xingzhela  
       May 16, 2016
    @juxingzhutou 什么意思
    toono
        5
    toono  
       May 17, 2016
    没有抽象类,你可以写一个基类结合断言`NSAssert(false, @"Over ride in subclasses");`
    holy_sin
        6
    holy_sin  
       May 17, 2016
    参照 RACStream
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5885 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 03:23 · PVG 11:23 · LAX 20:23 · JFK 23:23
    ♥ Do have faith in what you're doing.