Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically change title of window created by storyboard

In xcode 6.1, how do i programmatically change the title of the window created by storyboard? This project is for OS X. By default, it is "Window". I am using OBJ C.

like image 890
Brad Nelson Avatar asked Dec 12 '22 01:12

Brad Nelson


1 Answers

Code in Swift is

override func viewDidAppear() {
    self.view.window?.title = "joe"
}

and in Objective-C it's approximately self.view.window.title = @"joe";

It has to be in the viewDidAppear because in the viewDidLoad it's too early.


OT, but to do it via Storyboards it's here:

enter image description here

like image 198
Dan Rosenstark Avatar answered Dec 27 '22 11:12

Dan Rosenstark