应用处于活动状态时,我正在显示通知警报。在AppDelegate中,我正在处理推送通知警报和操作。我想检测用户是否在VC中输入UITextView。
如何检查?
以下是 AppDelegate.swift
中的代码段def flatten_json(nested_json):
try:
out = {}
def flatten(x, name=''):
if type(x) is dict:
for a in x:
flatten(x[a], name + a + '_')
elif type(x) is list:
i = 0
while i > 0:
for a in x:
flatten(a, name + str(i) + '_')
i += 1
else:
out[name[:-1]] = x