I'm just an engineer studying
swift as a hobby. I don't use it at all at work.
swift once around 2015, and recently rekindled and re-studied.
If the value of
spacing contains a value other than 0, it seems that the constraint will be affected, so
It is better to enter 0 for
spacing (anywhere that does not affect the constraint).
Cannot declare conformance to 'NSObjectProtocol' in Swift;
I get angry.
In this case, ʻimport Foundation
and then inheriting NSObject
is the solution. In my case, it was difficult because I deleted ʻimport Foundation and tried and errored.
Multiple commands produce XXX occurs.
If you look closely,
Target [app name] has copy command from XXX and
Target [app name] has link command with output XXX occur.
After a little research, something seemed to be in conflict. I think it was bad to manually copy the
.swift file on
I wasn't sure, so I solved it by recreating the project.
The problem was solved by copying
Main.storyboard from the old project folder to the new project folder on
I didn't know the location of
Main.storyboard for a moment, but on
Finder, it is in
... / [app name] / [app name] /Base.Iproj/.
The site of here will be helpful.
I want to insert a line feed code and start a new line at any place, but it does not.
It didn't seem to work with
\ n, so I had to type
You can enter
\ by holding down the ʻoption
key and pressing \ `.
I created a new
ViewController such as the transition destination and tried to connect with the same as the
ViewController from the beginning, but only the ʻObject
item can select ʻExit.
Select the target
ViewController on the
Select the class corresponding to
Custom Class of ʻIdentity Inspector`.
In order to prevent the bloat of
ViewController, you can create a separate class that inherits ʻUITableViewDelegate
and ʻUITableViewDataSource and delegate the processing to that class.
In this case, there are some points to be aware of.
The instance of the class to be delegated must be created outside
Well, if you think about it for a moment, it's natural.
If the delegation destination is
ViewController (yourself), it works fine even if you create an instance in
Although it deviates from the main subject, if you want to instantiate in
viewDidLoad () due to timing problems (if you want to do it after some processing), just declare variables outside
viewDidLoad () and
There is no problem if you substitute it in viewDidLoad ().