PDA

View Full Version : problem with UIColor / initWithCGColor




d.devendran
Nov 6, 2009, 04:16 AM
i try with below code;

the below declare in .h file
-------------------------
UIPushButton *markButton;
CGColorSpaceRef colorSpace;

the below is in .m file
--------------------
markButton = [[UIPushButton alloc] initWithFrame:CGRectMake(60.0,29.0,106.0,30.0)];
[markButton[b] setAutosizesToFit:NO];
[markButton[b] setShowPressFeedback:YES];
[markButton[b] setTitle:@"new game"];
[markButton setTitleColor:CGColorCreate(colorSpace,white) forState:0];


when compile, i'm getting error as below,

cc1obj: warnings being treated as errors
apview.m: In function '-[APView initWithFramewnedBy:]':
apview.m:59: warning: receiver 'UIColor' is a forward class and corresponding @interface may not exist
apview.m:59: warning: no '-initWithCGColor:' method found
apview.m:59: warning: (Messages without a matching method signature
apview.m:59: warning: will be assumed to return 'id' and accept
apview.m:59: warning: '...' as arguments.)
apview.m:59: warning: 'UIPushButton' may not respond to '-setTitleColor:'
make: *** [apview.o] Error 1



dejo
Nov 6, 2009, 08:49 AM
Post withdrawn. Already being covered in your other thread. Please don't post dupicates.