How to create a view hierarchy programmatically without usin开发者_Python百科g a nib ?
The whole view hierarchy can be constructed using successive UIView construction and -addSubview: methods. 
For instance, to create an input form one may use
UIView* rootView = [[UIView alloc] initWithFrame:...];
// apply style to rootView
[window addSubview:rootView];
[rootView release];
UILabel* inputLabel = [[UILabel alloc] initWithFrame:...];
// apply style to label
[rootView addSubview:inputLabel];
[inputLabel release];
UITextField* inputField = [[UITextField alloc] initWithFrame:...];
// apply style to text field
[rootView addSubview:textField];
[textField release];
and so on.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论