今天扩展iOS 10 Swift,显示更少

时间:2017-03-31 18:01:49

标签: ios swift xcode widget today-extension

我遇到了Swift中的Today Extension问题。问题是关于函数"显示更少",似乎我在窗口小部件中的所有按钮和标签都是自我压缩的(请查看屏幕截图)。 我能做什么?一些暗示? 非常感谢你。 First image compressed cause Show Less button pressed Expansed widget with Show More pressed

1 个答案:

答案 0 :(得分:0)

您需要设置适当的约束,使其适用于紧凑以及展开模式。

我使用所有标签来设置我的from bisect import bisect_right _bertrand_primes = [ 2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 5003, 9973, 19937, 39869, 79699, 159389, 318751, 637499, 1274989, 2549951, 5099893, 10199767, 20399531, 40799041, 81598067, 163196129, 326392249, 652784471, 1305568919, 2611137817, 5222275627] def prime_between_n_and_2n(n): """Find a prime number p such that n < p < 2n. The returned value will be the first 'Bertrand prime' <https://oeis.org/A006992> greater than n. n is limited to 1 < n < 2**32 but need not be an integer. Outside those limits, None is returned. """ if 1 < n < 2**32: return _bertrand_primes[bisect_right(_bertrand_primes, n)]

enter image description here

您可以使用的

constraints列表:

enter image description here enter image description here