Re: [iPhone-AppDev-Auditors] Digest for iphone-appdev-auditors@googlegroups.com - 2 Messages in 1 Topic

20 views
Skip to first unread message

Duane Bender

unread,
Oct 5, 2012, 8:07:03 AM10/5/12
to iphone-appd...@googlegroups.com
If you followed the professor's example, you should have your GraphView as a property of your GraphViewController. If so, you can access the GraphView's dimensions directly from the controller:

    self.GraphView.bounds.size.width
Or am I misreading your issue?

Duane

On Thu, Oct 4, 2012 at 11:51 PM, <iphone-appd...@googlegroups.com> wrote:

Group: http://groups.google.com/group/iphone-appdev-auditors/topics

    zallanx <zal...@gmail.com> Oct 03 08:04PM -0700  

    (copypasta from my SO post.. where no one has answered so far :*( )
     
    I am having a terrible time trying to pass a bit of information from my
    GraphingCalcView to myGraphingCalcViewController -_-
     
    Basically, I can know about the width of my screen from my GraphingCalcView using
    the functionviewSize = self.bounds.size.width / scale .. pretty simple
    stuff. I'd like to pass viewSize*from the View to my Controller* (
    GraphingCalcViewController), so that it can do a simple transformation (for
    example, do viewSize + 1), and pass it back to to the View.
     
    I have (and believe) that I set up the whole protocal/datSource/delegation
    thing correct (I really just followed the example of "Happiness" presented
    in the lecture), so I won't paste the details.
     
    I have two equations in my protocol listed in the View's header file..maybe
    something is wrong here:
     
    -(float) calcResult: (GraphingView *) sender;
    @optional
    -(void) passingVariable: (float) variable;
     
    Basically, in my *View*, I call the @optional to pass viewSize: [self.dataSource
    passingVariable:viewSize] , then in my *Controller*, I set viewSize to a
    Model property calledself.result so that: self.result = viewSize, and then
    return the model property:
     
    -(float)calcResult:(GraphingView *)sender
    {
    return self.result;
    }
     
    Now, in my *View*, when I assign a float to [self.dataSource
    calcResult:self], I always get a 0, instead of any value that I passed to
    it.. X_X.. I was wondering if my whole concept about passing stuff from
    View to the Controller is correct, and what I am doing wrong.. Thanks for
    reading!

     

    Asad Khan <asadkh...@gmail.com> Oct 04 04:41PM +0500  

    Can you post link to your SO post its very hard to read all text here.
     
     

     

You received this message because you are subscribed to the Google Group iphone-appdev-auditors.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this message because you are subscribed to the Google Groups "iPhone Application Development Auditors" group.
To post to this group, send email to iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-aud...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphone-appdev-auditors?hl=en.

Reply all
Reply to author
Forward
0 new messages