开发者

'colorchooser' undeclared

Okay so I'm super brand new to cocoa and I have one failed thing. It says 'colorchooser' undeclared on the first (colorchooser.selectedSegmentIndex == 0)I have no idea what's wrong!

//
//  Flashbox2ViewController.m
//  Flashbox2
//
//  Created by Paxton Harman on 2/1/11.
//  Copyright 2011 Santa Barbara City College. All rights reserved.
//

#import "Flashbox2ViewController.h"

@implementation Flashbox2ViewController
@synthesize colorChooser, sampleText;

-(IBAction) colorChanged {
    if (colorchooser.selectedSegmentIndex == 0) sampleText.textColor = [UIColor blackColor];
    if (colorchooser.selectedSegmentIndex == 1) sampleText.textColor = [UIColor blueColor];
    if (colorchooser.selectedSegmentIndex == 2) sampleText.textColor =开发者_运维知识库 [UIColor redColor];
}


choose colorchooser or colorChooser


If you are making a @property of colorChooser and @synthesize it... then it is obvious that you should use colorChooser.selectedSegmentIndex and not colorchooser.selectedSegmentIndex...

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜