草庐IT

NSVariableStatusItemLength

全部标签

cocoa - Swift 使用 NSStatusBar statusItemWithLength 和 NSVariableStatusItemLength

我正在尝试重写StatusBarProgrammingTopics中的以下代码在Swift中。NSStatusBar*bar=[NSStatusBarsystemStatusBar];theItem=[barstatusItemWithLength:NSVariableStatusItemLength];[theItemretain];[theItemsetTitle:NSLocalizedString(@"Tablet",@"")];...到目前为止我的Swift代码:letbar=NSStatusBar.systemStatusBar()letsm=bar.statusItemWi