App runs then exits

Discussion in 'iOS Development' started by nickmues, Sep 16, 2008.

  1. nickmues

    nickmues New Member

    Joined:
    Sep 14, 2008
    Messages:
    3
    Likes Received:
    0
    hi,

    I have a "hello world!" app that will not work if I include this statement:

    [ textView setTextSize: 18 ]

    textView is a UITextView

    if I leave out that statement, it works, with it complied, the window comes up
    but then quickly dissapears.

    I am using TOOChain or a jailbroken 3g IPhone

    note: the size of the TextSize does not matter either.

    thanks a million!
  2. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    note that when using the compatibility toolchain, the old headers exist, but some of the objects and their methods have changed. not everything will work. so, please try

    setFontSize

    i'm not sure off the top of my head but i think thats the new method, and it takes a CGFloat. it will say it may not respond to when compiling, but that's because its not in your header file!
  3. ubunix

    ubunix Member

    Joined:
    Aug 6, 2008
    Messages:
    637
    Likes Received:
    1
    Device:
    iPhone 5 (Black)
    I think setFontSize: should compile if you have the new UIKit in your /var/include directory and add the UIKit.h to your header file.
  4. nickmues

    nickmues New Member

    Joined:
    Sep 14, 2008
    Messages:
    3
    Likes Received:
    0
    thanks for the quick response!
    I see your quite the expert and am honored that your taking the time to help me.
    so your saying I should try setFontSize instead of setTextSize correct?

    how would I get the correct header installed on my iPhone.
    I am compling my apps on the iPhone also.

    thanks

    Nick
  5. exit1010

    exit1010 Well-Known Member

    Joined:
    Dec 30, 2007
    Messages:
    4,812
    Likes Received:
    48
    Device:
    4G iPod touch
    what did i do!!!! i heard my name...

    lol

    yeah what gjb said.
  6. nickmues

    nickmues New Member

    Joined:
    Sep 14, 2008
    Messages:
    3
    Likes Received:
    0
    I tried using the setFontSize the compiler gives warning that it doesn't like setFontSize
    and compiles anyway but still does not work.

    How do I get the new UIKit headers?

    it's very strange that the app runs without this setting...

    thank you all and thanks to anyone that can help me.

    I saw previous posts that users had this kind of issue but never really saw a cure for it.
  7. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    ok how i use it in the sdk is settings the font to a UIFont, which you dont have the header for i dont believe, and its under NDA(no talky about it!). so research on UIFont from UIKit

Share This Page