iOS Question action sheet with empty otheritems, does not work

Discussion in 'iOS Questions' started by Albi, Jun 1, 2015.

  1. Albi

    Albi Active Member Licensed User

    If I try to initialise an action sheet without any otheritems, it doesn't work. If I use an empty string in the list, it returns an option in the action sheet, but without text. (I want just a destructiveitem and a cancelitem)

    actDelete.Initialize("actDelete""""Cancel""Delete"Array As String(""))
    This returns a cancel item, destructive item, and an empty box for other options.

    This returns an error (types do not match, and it doesn't compile.
    Expected: NSArray, object type: __NSCFConstantString

    Maybe this should be in the wishlist?
  2. Erel

    Erel Administrator Staff Member Licensed User

    The last parameter is an array. You cannot pass an empty string as an array parameter.

    Pass Null instead:
    You can also pass an empty array:
    Albi likes this.
  3. Albi

    Albi Active Member Licensed User

    thanks! (I can't believe i didn't think to try those things)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice