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

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

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