作者:朱克锋
邮箱:zhukefeng@iboxpay.com
转载请注明出处:http://blog.youkuaiyun.com/linux_zkf
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(88, 120, 80, 40)];
label.text = @"test";
[self.view insertSubview:label atIndex:[[self.view subviews] count]];
类似方法
- (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview
- (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview
本文介绍如何使用UILabel在指定位置插入子视图,并提供具体代码实现。文中展示了两种插入子视图的方法:将视图插入到另一个视图之上或之下。
135

被折叠的 条评论
为什么被折叠?



