The UILabel cannot be segmented in Xcode.

Asked 2 years ago, Updated 2 years ago, 72 views

I use Xcode to create a counting app with objective-c.
It's a simple one with only buttons and labels, and when I tried to enter UILabel and connect it to the label, ○ didn't appear and the text color remained black.
There were no spelling mistakes.
Is this a configuration problem?
This is my first time developing it, so please give me an easy answer.

objective-c xcode

2022-09-30 19:44

1 Answers

Instead of writing and connecting the Outlet from the beginning, try pulling the UI parts between the lines of the source with a right click.There will be a blue line saying, "The line will be inserted here," so let go of the mouse.
Then you'll see a dialog about what type and what name you want to use, and you'll enter your Outlet name in it.

This is also valid for IBAction, so please try it.


2022-09-30 19:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.