Posted in iOS, Swift

iOS, Swift | UI connection between storyboard and .swift source issue


Xcode Version 9.0.1



Error occurs whenever control-drag to connect ui and source from storyboard to .swift file like the screenshot.

Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key


Try control-drag from an UI image in storyboard to a source code like the above image.

And then build and run an application.

After this, the both ways works.

1st – control-drag from a title of an UI in storyboard to a source file.

2nd – control-drag from an UI image in story board to a source file.

I don’t understand why. But it works for me.


Posted in Mysql

MySQL | Access denied for user ‘root’@’localhost’


$ mysql -u root

ERROR 1698 (28000): Access denied for user ‘root’@’localhost’

$ /usr/bin/mysqld_safe –skip-grant &

mysqld_safe A mysqld process already exists

$ sudo killall mysqld mysqld_safe

mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.

$ sudo /usr/bin/mysqld_safe –skip-grant &

mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists.


$ sudo killall mysqld mysqld_safe

$ sudo mkdir -p /var/run/mysqld

$ sudo chown mysql:mysql /var/run/mysqld

$ sudo /usr/bin/mysqld_safe --skip-grant &

$ sudo /usr/bin/mysqld_safe --skip-grant-tables &

$ mysql -u root


Posted in iOS, Swift

iOS – Swift | Screen transition with data

Key point : Call the ‘performSegue’ function in viewDidAppear section

1. Generate Segue

Control-Drag a mouse point from the circle of starting view controller to the ending view controller

2. Select ‘Present Modally’

3. Select the arrow line

4. Set the ‘Storyboard Segue – Identifier’

5. Insert the source code to the ‘viewDidAppear’ section at a swift file for the view controller.

    override func viewDidAppear(_ animated: Bool) {
        performSegue(withIdentifier: "SignupSegue", sender: self)