在表视图中显示数据

时间:2018-04-23 09:00:00

标签: ios uitableview swift4

我创建了两个标签,我想在一个标签中显示问题,并在其他标签中回答选项。 我必须使用可选按钮显示选项,就像选择一行中的多项选择问题类型一样,一次只能选择一个答案

建议将不胜感激

我特此附上我的代码以及模拟器输出屏幕的屏幕截图。

代码 -

import numpy as np
import matplotlib.pyplot as plt

def __sigmoid_derivative(x):
    return x * (1 - x)

x = np.linspace(-10, 10, 1000)

y1 = __sigmoid_derivative(x)

plt.plot(x, y1)
plt.legend(loc='upper left')
plt.show()

1 个答案:

答案 0 :(得分:3)

您必须设置self.layout_clock = Clock.schedule_interval(self._trigger_layout, 0) UILabelnumberOfLines属性。

不要忘记添加lineBreakMode方法。

heightForRowAt

现在看起来像这样。 enter image description here

相关问题