TIPS APP

Neo L
彼得潘的 Swift iOS / Flutter App 開發教室
2 min readNov 21, 2019

As a beginner in code area, I spent a lot of time to study the way to combine code with IBOutlet and IBAction.

Finally I just realised the biggest problem for me is greedy. In order to take care all details, I watched many examples trying to combine all of it in my app. But, hey, I am a beginner. Making mistakes is my advantage. All I need to do is copy each function and do it well. Then add on others func one by one.

Here I decide take my classmate YY to start.

we do not want present keyboard when user select {Total textfield}.

Therefore we uncheck {enabled}. Keyboard won’s present because users are unalbe to select [textField].

then, somehow it crashed….I decide to start over again. T_T

make a new one.

In the beginning the caculate Button was covered by number pad. I tried to copy my classmate’s func to hide pad via tap anywhere but false.

— — — — — — — — — — — —

//按任意地方收鍵盤 func hideKeyboardWhenTappedAround() { let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.dismissKeyboard)) view.addGestureRecognizer(tap) } func dismissKeyboard() { view.endEditing(true) }

— — — — — — — — — — — — — — — — — — — — — — -

Therefore I moved [caculate] button.

(正所謂山不轉路轉)

(anyway I don’t understand the func I was tried to copy)

When I use iPhone 11 as stimulator, number pad didn’t show up?

『Solution:Cmd+K』!!

--

--