how can i save "Button.frame.origin.x"?

Discussion in 'iOS Programming' started by junmoney83, Mar 9, 2010.

  1. junmoney83 macrumors newbie

    Joined:
    Mar 3, 2010
    #1
    float jung = firstButton.frame.origin.x

    when i do , i can see 6.0939393-e from jung variable.

    how can i save jung variable as float?


    and when i do below,
    jung can save 0...

    NSString *jung = [NSString alloc]
    initwithformat: @"%.2f", firstButton.frame.origin.x];
     
  2. teek macrumors member

    teek

    Joined:
    Feb 12, 2008
    Location:
    Norway
    #2
    Your question does not make sense. What are you trying to do? What do you mean by save ? and what do you mean by "save 0"
     
  3. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London

Share This Page