gpt4 book ai didi

iphone - 使用 xib 和通过代码添加的区别 - iPhone

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:49:54 26 4
gpt4 key购买 nike

使用xib和通过代码添加页面元素有什么区别?

如果我使用 xib,内存是如何分配的?

最佳答案

What is the difference between using xib and adding page elements via code?

我所知道的唯一真正的区别是使用代码非常棒,推荐给初学者,以便他们了解 UIKit 的工作原理。

How the memory is allocated if I am using an xib?

就像您手动创建对象一样,除了,例如,执行 [[UIImageView alloc] init] 的不是您的 View Controller ,而是默认工厂类UIKit(很可能是 NSCoder 的一些私有(private)子类)。

关于iphone - 使用 xib 和通过代码添加的区别 - iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13466524/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com