FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
02/16/16 12:22 AM (8 years ago)

Open Calendar funtion

hi guys, ive got a funtion within my app that simple opens up the internal calendar, on Android it works perfectly, but on ios im getting a couple of errors,heres the code from the .m file. //viewDidLoad -(void)viewDidLoad{ [BT_debugger showIt:self theMessage:@"viewDidLoad"]; [super viewDidLoad]; //in case you want to add image to the button and remove the text, uncomment the two lines below //make sure to change the imageName to the name of your image in all loweercase letters //[_openCal setBackgroundImage:[UIImage imageNamed:@"imagename"forState:UIControlStateNormal]; //[_openCal setTitle:@""forState:UIControlStateNormal]; } whats happening is when i uncomment the 2 lines above and put in an image name i get these errors below. No Known class method for selector 'imageNamed:forState:' and Expected']' can anyone tell me what im doing wrong thanks sean
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/16/16 12:31 AM (8 years ago)
[_openCal setBackgroundImage:[UIImage imageNamed:@"imagename"] forState:UIControlStateNormal]; you missed the square bracket after imagename"
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
02/16/16 02:38 AM (8 years ago)
Thanks Kittsy, Your star , that sorted it, cheers dude Sean
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.