NSTimer userinfo目标c

问题描述

我已经使用以下方法在NStimer中保存了一组字典:

import sys

vals = sys.argv[1:]

#vals = ['apple','mango']
s = test_info.loc[test_info['Item'].isin(vals),'MP-ID']

test_data['MP-ID match'] = test_data['MP-ID'].str.findall('|'.join(s)).str.join('|')
test_data['count'] = test_data['MP-ID match'].str.count('MP')
test_data = test_data.sort_values('count',ascending=False,ignore_index=True)
print (test_data)
     id Name                   MP-ID    MP-ID match  count
0  3344  nop  MP:08597|MP:001|MP:005  MP:001|MP:005      2
1   123  abc  MP:001|MP:0085|MP:0985         MP:001      1
2   456  def          MP:005|MP:0258         MP:005      1
3   789  hij          MP:025|MP:5890                     0
4  1122  klm        MP:0589|MP:02546                     0
    

然后我使用这种方法检索用户信息:

NSDictionary *dict = @{@"key": name};
NSTimer *timer23 = [NSTimer scheduledTimerWithTimeInterval:(5.0) target:self 
selector:@selector(nameRequest:) userInfo:dict repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer2 forMode:NSRunLoopCommonModes];

有时,当我将对象映射到nameModel时出现错误“ Thread 1:EXC_BAD_ACCESS(code = 1,address = 0x18)”时,应用程序崩溃。有人可以告诉我这里的代码有什么问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)