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

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

  •  
  •   helloword001 · May 16, 2016 · 4045 views
    This topic created in 3852 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   ·   3449 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 01:00 · PVG 09:00 · LAX 17:00 · JFK 20:00
    ♥ Do have faith in what you're doing.