Ios 在类上使用struct会对允许的数据大小产生影响吗?
目前,我正在设计一个记笔记的应用程序 其总体使用情况应为:Ios 在类上使用struct会对允许的数据大小产生影响吗?,ios,swift,Ios,Swift,目前,我正在设计一个记笔记的应用程序 其总体使用情况应为: class Note { var title: String? var body: String? } var notes = [Note]() notes.append(Note()) 我很想把笔记设计成结构 struct Note { var title: String? var body: String? } var notes = [Note]() notes.append(Note()
class Note {
var title: String?
var body: String?
}
var notes = [Note]()
notes.append(Note())
我很想把笔记设计成结构
struct Note {
var title: String?
var body: String?
}
var notes = [Note]()
notes.append(Note())
但是,我也担心这可能会限制
struct Note
的大小是固定的,与字符串中存储的字符数无关。