UIActionSheet Crashes on iPad / not iPhone

前端 未结 6 596
-上瘾入骨i
-上瘾入骨i 2021-01-03 16:24

When I look in the console I get this message

2010-09-18 17:04:05.284 Wasted Time[8998:207] *** Assertion failure in -[UIActionSheet showInView:], /SourceCache/UI         


        
6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-03 16:43

    For those like me that may be using UIActionSheet slightly differently than in the original question, but still failing on iPad, I had been using:

    [actionSheet showFromRect:m_view.bounds inView:m_view animated:YES];
    [actionSheet release];
    

    ...which works on iPhone but fails on iPad.

    This example works in my particular app on both devices:

    [actionSheet showInView:m_view];
    [actionSheet release];
    

    Regards, David

提交回复
热议问题