error:postfix is reserved

Asked 2 years ago, Updated 2 years ago, 76 views

Drag Button to ViewController.swift to change to Action and
@IBAction functappedButton (sender:Any-Object){}
A program called

was added.

Then write label.text="Welcome" in {} of the taggedButton method and
When I try to start the simulator, I get an error saying postfix is reserved.

Enter a description of the image here

swift xcode

2022-09-30 20:47

1 Answers

Is there no space between label. and text?

question code

label.text="Welcome"

Correct Code

label.text="Welcome"

This post was posted as a community wiki based on @ita_3y's comments.


2022-09-30 20:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.