Simply using this way:
UIView* view2 = [view1 copy]; // view1 existed
This will cause simulator can not launch this app.
Try retai
UIView doesn't implement the NSCoping protocol, see the declaration in UIView.h:
UIView
NSCoping
@interface UIView : UIResponder
So, if we want to have a copy like method, we need to implement the NSCoping protocol in a category or so.
copy