Imgene
?
David
or record your trouble via quicktime)
Anonymous
nothing, when I create a new View Controller, I create the text box, only Action, not IBOutlet, an example, I have a login screen, and when I press register, another window will open, but on that new one I can not execute a IBOutlet, this is code.
Anonymous
@IBOutlet weak var TxUser: UITextField! @IBOutlet weak var TxPass: UITextField! override func viewDidLoad() { super.viewDidLoad() self.TxUser.delegate = self self.TxPass.delegate = self } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { self.view.endEditing(true) } func textFieldShouldReturn(_ TxUser: UITextField) -> Bool { TxUser.resignFirstResponder() return (true) } }
Dry
so, it should work fine, doesn't it?
Anonymous
Dry
first of all, you dont need () around true
Anonymous
look at the second window, there I have a text box, where I want the keyboard to be hidden as well and pressing back
Dry
then variables names have to have first letter lowercased
Dry
look at the second window, there I have a text box, where I want the keyboard to be hidden as well and pressing back
so, for another view controller you have to create another controller .swift file
Anonymous
Anonymous
watch the video, do not let me hide the keyboard in the other window
Dry
nice music btw
Dry
so, as i said before, you need to create another file, like SecondViewController
David
кароч у него клава не убирается
David
он ваще никак не обрабатывает это видимо)
Dry
SecondViewController: UiviewController, UITextFieldDelegate { }
Dry
and so on
Dry
and asiign it to your second viewcontroller
Anonymous
good, but, no edit… new view controller 🙁
David
Yep, you have to handle textfield actions (in your case 'return key pressed') and you have to manage this in separate view controller file
David
закидает он нас тут вопросами...
Dry
just press cmd+n choose "new swift file"
Dry
ну хоть инглиш тренирнем
David
то да)
Dry
хотя, ему, по ходу, тяжелее чем нам
David
имена у них конечно жесть длинные, глянь на скрине)
Dry
где? вроде норм
Dry
yeah. thats it
Anonymous
should not have an "M" instead of "A"
Dry
fuck it
Dry
in storyboard assign this file to second controller
Dry
do you know how?
David
где? вроде норм
тот скрин что он кидал, над видео, в начале файла комментарий с именем
Dry
Ихен Эрек Моголон Пена
Dry
норм
Dry
как футболист
David
ага, называют там по маме, по папе, бабушке дедушке)
Dry
Михаил Евграфович Салтыков-Щедрин
Деда
Да... тяжело у пацана год начался
Dry
rename to SeconViewController. Like file name
Dry
go to storyboard
Dry
select second controller
Valery
Интересна реакция чатика, если бы это спросили по-русски))
Dry
choose your swift file here
Valery
Вряд ли бы учили файлы создавать
Anonymous
Do you still need to change the "A" to "M"? since it does not let me edit
Деда
Don’t use Swift!
Ольга
@safronovser не знаешь в чем может быть табла?
Я так понимаю, это баг икскода. Еще через сториборд не выставляется attributed text и, по-моему, кастомные шрифты, но последнее возможно пофиксили
Деда
Тоже внесу вклад в помощь 😀
Dry
Вряд ли бы учили файлы создавать
мы тут тоже пользу извлекаем
Valery
мы тут тоже пользу извлекаем
Давайте сделаем день английского языка: все вопросы и обсуждения только на английском
Деда
Давайте лучше всем чатом отговорим его использовать Swift
Деда
Я начинаю
Anonymous
Деда
Prick up in swift ass!
Dry
1,29 мб скрин, охренеть
Anonymous
Anonymous
Prick up in swift ass!
😂😂😂😂😂
Деда
Ооо, завёлся 😂
Ilkhom
Давайте сделаем день английского языка: все вопросы и обсуждения только на английском
хорошая идея, хоть один день не буду переключать раскладку
Dry
You are a fucking God!
just Joker leaved for a minute
Деда
хорошая идея, хоть один день не буду переключать раскладку
Ты обращаешь внимание на переключение раскладки?
Valery
хорошая идея, хоть один день не буду переключать раскладку
И сразу отсеятся те, кто не может гуглить на английском