我向FormViewController添加了很多行,从顶部开始的第二行是TextAreaRow。
textAreaRow = TextAreaRow(){row in
row.textAreaHeight = TextAreaHeight.dynamic(initialTextViewHeight: 30)
row.placeholder = "..."
}
但是当我继续在textAreaRow中输入内容时,输入的内容会被键盘覆盖(下面的演示GIF):
你可以在演示中看到,当我输入5并继续时,它被键盘覆盖。
如何修复???
当键盘覆盖时,我可以滚动textAeraRow吗?怎么做? 谢谢:))
答案 0 :(得分:0)
一个简单的解决方法是在TextAreaRow的corr_data = df[['event occurs','percent change']]
cat1 = corr_data[corr_data['event occurs']==True]
cat2 = corr_data[corr_data['event occurs']==False]
#----------------------
# is the sample normal / gaussian
#----------------------
from scipy.stats import shapiro # test for normalcy in small samples
from scipy.stats import normaltest
if (len(cat1['percent change'].index) <= 20 ):
stat1, p1 = shapiro(cat1['percent change'])
else:
stat1, p1 = normaltest(cat1['percent change'])
if (len(cat2['percent change'].index) <= 20 ):
stat2, p2 = shapiro(cat2['percent change'])
else:
stat2, p2 = normaltest(cat2['percent change'])
alpha = 0.05 # stat threshold
# both groups are normal
if ((p1 > alpha) and (p2 > alpha)):
print('Samples looks Gaussian (fail to reject H0)')
#----------------------
# if normal / gaussian run these tests
#----------------------
from scipy.stats import ttest_ind
stat, p = ttest_ind(cat1['percent change'], cat2['percent change'])
print('Statistics=%.3f, p=%.3f' % (stat, p))
if p > alpha:
print('Same distribution (fail to reject H0)')
else:
print('Different distribution (reject H0)')
else:
print('Samples do not look Gaussian (reject H0)')
#----------------------
# if not normal / gaussian run these tests
#----------------------
from scipy.stats import mannwhitneyu
stat, p = mannwhitneyu(cat1['percent change'], cat2['percent change'])
print('Statistics=%.3f, p=%.3f' % (stat, p))
if p > alpha:
print('Same distribution (fail to reject H0)')
else:
print('Different distribution (reject H0)')
事件上
onChange