正如您在此屏幕截图中看到的,我为UISegmentedControl
的高度添加了约束,但它总是比UISegmentedControl
的高度小一点。知道为什么吗?
答案 0 :(得分:1)
您已从# Example of custom encoder
class CustomJsonEncoder(json.JSONEncoder):
def default(self, o):
# Here you can serialize your object depending of its type
# or you can define a method in your class which serializes the object
if isinstance(o, (Employee, Autocar)):
return o.__dict__ # Or another method to serialize it
else:
return json.JSONEncoder.encode(self, o)
# Usage
json.dumps(items, cls=CustomJsonEncoder)
更改为Frame Rectangle
框架矩形取原框架。和对齐矩形采用布局框架。