如何在xcode中添加UIView作为子视图?

时间:2014-12-11 22:45:40

标签: uiview

如何在xcode中添加UIView作为子视图?我想将ww子视图添加到按钮本身吗?

由于

1 个答案:

答案 0 :(得分:0)

根据https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instm/UIView/addSubview ::

的文件
UIView *someView;
// ... set value of someView to the parent you want
UIView *childView;
// ... set value of someView to the parent you want

[someView addSubview:childView];