Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UIACtionSheet代表问题_Iphone_Cocoa Touch_Multithreading_Xcode - Fatal编程技术网

Iphone UIACtionSheet代表问题

Iphone UIACtionSheet代表问题,iphone,cocoa-touch,multithreading,xcode,Iphone,Cocoa Touch,Multithreading,Xcode,我正在使用一个操作表在登录到我的应用程序时提醒用户注意几个项目。下面列出了一些警报示例以及伴随警报而来的按钮 INVALID USER - OK INVALID PASSWORD - OK INVALID USER - OK UNKNOWN USER - CREATE NEW USER, CANCEL USER ALREADY LOGGED IN - DISCONNECT, CANCEL LOGIN 管理多个操作表并让一名代表(自己)处理各个表上的各种按钮的最佳方式是什么 我尝试将AppDel

我正在使用一个操作表在登录到我的应用程序时提醒用户注意几个项目。下面列出了一些警报示例以及伴随警报而来的按钮

INVALID USER - OK
INVALID PASSWORD - OK
INVALID USER - OK
UNKNOWN USER - CREATE NEW USER, CANCEL
USER ALREADY LOGGED IN - DISCONNECT, CANCEL LOGIN
管理多个操作表并让一名代表(自己)处理各个表上的各种按钮的最佳方式是什么

我尝试将AppDelegate属性设置为标志值,以确定应该在委托函数中执行哪些操作。。。即

//not actual code written in english-ese...
if (lastCommand = @"INVALIDUSER")
  if buttonIndex=0 { .. }
  if buttonIndex=1 { .. }
} else if (lastCommand = @"UNKNOWNUSER"){
  if button index=0 { .. }
  if button index=1 { .. }
} 
等等。。。 但是我的flag属性(lastCommand)无效,我假设是因为我在两个独立的线程中工作


最好的方法是什么?一如既往,我们非常感谢您的建议。

我最终使用了UIActionSheet.tag属性