IBAction Call

Discussion in 'iPad Development' started by swilker, Jul 24, 2011.

  1. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    :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
    }
     
  2. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    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
     
  3. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    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....
     
  4. twerppoet

    twerppoet iPad Legend

    Joined:
    Jan 8, 2011
    Messages:
    17,201
    Thanks Received:
    2,441
    Trophy Points:
    113
    Location:
    Walla Walla, WA
    Ratings:
    +2,970 / 1
    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.
     
  5. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    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
     
  6. twerppoet

    twerppoet iPad Legend

    Joined:
    Jan 8, 2011
    Messages:
    17,201
    Thanks Received:
    2,441
    Trophy Points:
    113
    Location:
    Walla Walla, WA
    Ratings:
    +2,970 / 1
    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.
     
  7. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    twerppoet,

    Nope didn't know that, thanks for the tip.

    having fun.

    Drew
     
  8. swilker

    swilker iPF Novice

    Joined:
    Jul 4, 2011
    Messages:
    12
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Maryland
    Ratings:
    +0 / 0
    I figured it out

    Got it done!
     
  9. twerppoet

    twerppoet iPad Legend

    Joined:
    Jan 8, 2011
    Messages:
    17,201
    Thanks Received:
    2,441
    Trophy Points:
    113
    Location:
    Walla Walla, WA
    Ratings:
    +2,970 / 1
    Nice! Onward ho.
     

Share This Page

Search tags for this page
how to call another ibaction routine from a ibaction routine
,

xcode ibaction call void from another view