I am having a problem with CGPoint, I couldn’t find any answer here as well, so I made this question, I want 2 variables to be accessible around the .m file, however when I try to put a value in the CGPoint variable it’s giving me an “Expected expression”. I am a beginner in iOS app development, so I don’t really know how would I be able to fix that, can anybody give me tips about this? I would appreciate it a lot. Here’s a sample code of what I’m trying to do
at the .m file:
@interface file()
{
CGPoint sample1;
CGPoint sample2;
}
@implementation file
-(void)viewDidLoad(){
sample1 = {5.0, 8.0}; ->> and this is where I’m getting the “expected expression” error.
sample2 = {4.0, 2.0}; ->> and this is where I’m getting the “expected expression” error.
}