美文网首页
父子控件

父子控件

作者: 挖掘机 | 来源:发表于2016-02-14 11:05 被阅读30次

import "Vie*

wController.h"~~*~~** @interface ViewController () @property (weak, nonatomic) IBOutlet UILabellabel;

@end

@implementation ViewController

(void)viewDidLoad {

}

(IBAction)btnClick {

UISwitch *swh=[[UISwitch alloc]init];

UIStepper *sp=[[UIStepper alloc]init];

[self.view addSubview:sp];

[self.view addSubview:swh];

UISlider *sl=[[UISlider alloc]init];

[self.view insertSubview:sl aboveSubview:swh];

}

@end

相关文章

网友评论

      本文标题:父子控件

      本文链接:https://www.haomeiwen.com/subject/nfiukttx.html