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 setAutosizesToFit:NO];
[markButton setShowPressFeedback:YES];
[markButton 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
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 setAutosizesToFit:NO];
[markButton setShowPressFeedback:YES];
[markButton setTitle
[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