What's new

IBAction Call

swilker

iPF Noob
:confused:
Help Please,

I'm new. I've been working on a plotting function that used a draw2D routing I found on line. I need to call the routine from IBAction with a date picker change and want to pass the date in the date picker. So basically I want to combine the IBAction and the plotting on the following two routines. Unsure how to combine them.

-(IBAction)showDate: (id) sender {
//date calculations.....
}

- (id)initWithFrame: (CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}

- (void)drawRect: (CGRect)rect {
//drawing code
}
 
OK I tried some experiments that didn't work. For clarification I have a routine that draws some lines with these two declarations:

- (id)initWithFrame: (CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}

- (void)drawRect: (CGRect)rect {
//drawing code
}

What I want is, for that to happen only when I push a button or some other action. I clearly don't understand the structure of the calls or I'd be able to do this. Can someone help me.

Drew
 
I am simply amazed. I asked this question yesterday at 12 and have had 71 people look at it without an answer. Come on. I'm not looking for the secret to life or an explanation of string theory. Just want to use an IBAction to draw a line. Is there anyone out there that that can actually program in this God awful language that will help me? Please....
 
Most of the people here are users, not developers. I see a moderator moved your post to the developer section, but it is more than possible that none of them have seen this, or that the few that have do not have an answer for you.

My own experience puts me some where between the user and developer (heavily biased towards user), and other than recognizing the code I haven't a clue.
 
Twerppoet,

Thanks much. I simply couldn't understand why no one posted a reply. I know this isn't a difficult question for a developer. I will go to work tomorrow and get someone to help me. I was hoping to get some help while on vacation to keep my project moving. I'm going to write free ware for educational projects for kids if I ever get proficient at Objective C and I Pad programming. Just getting started.

Drew
 
Good luck with that. It is a worthy cause.

Have you checked out KhanAcademy? They have an iPhone app, and are working on an iPad one. Seems like a group you'd be interested in, if you don't' already know about them.
 

Most reactions

Latest posts

Back
Top