ios两个view添加一个view会不会有问题

ios两个view添加一个view会不会有问题,第1张

不存在这个问题。假设你将要执行

[someView addSubView:sbView]

那么在被添加到父视图someView之前,如果sbView已经被otherView加载了,那么上面

的代码会先讲sbView从otherView remove掉,在被加载到someView。

所以一个view是不可能同时被2个以上的view加载做子视图的。

[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"xx"] forBarMetrics:UIBarMetricsDefault]UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:self]//隐藏导航栏你看看是...


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11846940.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-19
下一篇 2023-05-19

发表评论

登录后才能评论

评论列表(0条)

保存