且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将 IBOutlet 连接到 iOS 中的 textview 控件?

更新时间:2022-06-22 09:42:16

按住 CTRL 键并单击并从 .xib 中的项目拖动到代码中.这将创建一个 IBOutlet 或 IBAction(您通过弹出窗口选择)并将其链接到 .xib 上的对象.

Hold CTRL and click and drag from the item in the .xib into the code. This will create either an IBOutlet or IBAction (you chose via popup) and link it to the object on the .xib.

如果您已经创建了代码,也可以通过左侧检查器来完成.

It can also be done via the left hand inspector if you have already created the code.

如果您不熟悉 iOS 编程和 Xcode,我强烈建议您查看开发者门户上的 Apple 教程.他们有一些出色的介绍性指南,并附有分步说明.第二篇涵盖了故事板的使用,是对故事板、Xcode 和 iOS SDK 的非常棒的介绍 - 链接如下.

If you are new to iOS programming and Xcode I would very strongly recommend you look at Apple's tutorials on the developer portal. They have some excellent introductory guides with step by step instructions. The second one covers using storyboards and is a really great introduction to storyboards, Xcode and the iOS SDK - link below.

你的第二个 iOS 应用:故事板