Reputation: 3
I'm beginner in objective-c and i don't find a solution on internet about my problem.
I'm trying to add a new action to a Button and it doesn't work. Indeed i have more views in all the Views excepted the first View, i can't add this action to a button. I work with Interface Builder to design my graphical View.
And if i want to add action to a button of the 2,3rd .. View by linking the button to ViewController.h, i can't It's the same if i want to link the button to UIViewController.h, I have an error message which tell: Could not insert new action connection: No @implementation found for the class "UIViewController"
i want to do that for example, if a user click on this button i will change the background color of the current View.
Another Question:
I don't know how to know what the current view is, for example if i want to change the color of the current view what i have to do ?
Thanks for you help.
Upvotes: 0
Views: 1221
Reputation: 27225
Could not insert new action connection: No @implementation found for the class "UIViewController"
Answer : Make sure you have your ViewController.m
file in the project and that it has block starting with @implementation
and ending with @end
.
I don't know how to know what the current view is, for example if i want to change the color of the current view what i have to do ?
Answer : [self.view setBackgroundColor:[UIColor redColor]];
Upvotes: 2