跟随 iTunes U - 使用 Xcode 4 在 CS106B 中创建滑块应用程序

发布于 2024-12-11 09:06:44 字数 607 浏览 3 评论 0原文

我正在关注 iTunes U 课程中的第一个视频,讲师创建了一个滑块应用程序,我试图在我的系统上复制它,不幸的是我使用的 Xcode 版本与视频中使用的版本不同,因此使其难以跟随。我在我的应用程序中设置了滑块和标签,并且创建了“MyController”对象,但我不知道如何创建“MyController”、滑块和标签之间的链接。在视频中,他在选择“MyController”时创建了两个出口,但我不知道如何在 Xcode 4 中执行此操作,因为他使用的是 Xcode 3。然后他创建了一个操作。如果有人对如何完成这项工作有任何想法或想法,我将不胜感激。

基本上,当滑块移动时,它应该更新标签“number”。我希望可以提供该视频的链接,但我不确定这是否可行,因为我是通过 iTunes 访问该视频的。

视频可通过以下链接观看 https://podcasts.apple.com/us/播客/iphone-application-development-winter-2010/id384233225

I am following along with the first video in the iTunes U course, and the instructor creates a slider app that I am trying to replicate on my system, unfortunately I am using a different version of Xcode than what is being used in the video, thus making it difficult to follow along. I have the slider and the label setup in my app, and I created the "MyController" object, but I can't figure out how to create the link between the "MyController", Slider, and Label. In the video he creates two outlets while the "MyController" is selected, but I can't figure out how to do this in Xcode 4, as he is using Xcode 3. Then he creates an action. If anyone has any thoughts or ideas on how to get this done, I would appreciate it.

Basically when the slider is moved, it should update the label "number". I wish I could provide a link to the video, but I'm not sure if that is possible since I accessed the video via iTunes.

The video can be viewed at the following link
https://podcasts.apple.com/us/podcast/iphone-application-development-winter-2010/id384233225

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

表情可笑 2024-12-18 09:06:44

通过右键单击场景中的 UI 元素,我可以将连线从 UI 元素(滑块)拖动到相应的视图控制器文件。我设置了一个 IBAction,以便在滑块移动时通过右键单击滑块并拖动到视图控制器来更新标签。通过必要的插座和动作设置,我能够在移动滑块时更新标签。

By right clicking on a UI element in my scene I was able to drag a wire from the UI element (slider) to the appropriate view controller file. I setup an IBAction to update the label when the slider was moved by right clicking on the slider and dragging to the View Controller. With the necessary outlets and action setup I was able to update the label when the slider was moved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文