Closed. This question is off-topic。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                        
                        2年前关闭。
                                                                                            
                
        
我有一个带有自动布局的UIViewController的xib。但是由于某种原因,我根本无法使用可视的xib / storyboard文件。

是否有任何有助于将自动布局/约束转换为代码的通用方法/教程/库?

最佳答案

看这个:https://www.raywenderlich.com/125718/coding-auto-layout

(参考:https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/ProgrammaticallyCreatingConstraints.html

关于ios - 将自动布局(约束)从xib/storyboard转换为代码? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41610307/

10-12 17:12