problem with UIColor / initWithCGColor

Discussion in 'iPhone/iPad Programming' started by d.devendran, Nov 6, 2009.

Thread Status:
Not open for further replies.
  1. macrumors newbie

    Joined:
    Aug 3, 2009
    #1
    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:mad:"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
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Post withdrawn. Already being covered in your other thread. Please don't post dupicates.
     
Thread Status:
Not open for further replies.

Share This Page