Xcode Interface Builder - “correct” way to delete/rename miswired IBoutlets / IBactions

前端 未结 3 863
名媛妹妹
名媛妹妹 2020-12-01 01:06

I am new to Xcode, working through Swift, so I\'m not sure if what I am decribing is actually a bug.

When using interface builder and the assistant editor, I can cre

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 02:10

    The accepted answer is fine, but there are a few ways to do the same thing.

    Method One

    Right click the view in the storyboard and then click the little x by the referencing outlet.

    Method Two

    Right click the view name in the Document Outline. Then click the little x by the referencing outlet.

    Method Three

    Select the view on the storyboard and then click the Connections Inspector. Then you can click the little x to remove an outlet reference.

    Extra References in Code

    If you are getting outlet connections in code that you didn't add yourself see this answer.

提交回复
热议问题