Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将视图从冲击和支柱转换为自动布局,但现在 drawRect 中的自定义绘图代码没有被调用。这是预期的行为吗?如果是,我该如何解决?
在您的视图的 init 中(我们在您实例化视图的类中)设置 ContentMode:
yourView.contentMode = UIViewContentModeRedraw;