Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


RLScott @ @ @ @


Last Active
Tutorial Authors, Registered Users
  • Re: Calling a method every 0.1 seconds for a second without a NSTimers

    Hi guys. What i mean by not accurate enough is that it is supposed to call every 0.1 seconds but that fluctuates quite a lot. For example, it sometimes calls every 0.14 seconds and then it will call every 0.8 seconds. I think it is because there is quite a lot of code in the selector for the timer?
    You can get much more help if you tell us why you want to call a method every 0.1 seconds. As I said before, there are often other ways of doing things that you have not thought of. Without knowing anything about your application, I can't imagine why you would want to do this.

  • Re: Old app fails to open in iOS7

    Thanks Duncan. I found the problem. First I looked at iTunes Connect and there was a crash log waiting for me. So I downloaded it, symbolicated it, and found the line number in the source file where the exception occurred. It turns out it was an invalid parameter in a CGContextAddLineToPoint call. The coordinates were outside the size limits of the view. Apparently iOS6 did not complain, but iOS7 checks this and complains. Anyway, it should be easy to fix now that I know.
  • Re: floats not adding up correctly

    Ive tightened the log statements around where the _y value is incremented with the yvelocity like so
                    <br />NSLog(@"y before %.20f", _y);<br />NSLog(@"yvel_____ %.20f", yVelocity);<br />_x = _x + xVelocity;<br /> _y = _y + yVelocity;<br />                <br />NSLog(@"y after_ %.20f", _y);
    and here are the strange results Im getting (note both _y and yVelocity are declared as floats globally)

    y before 300.00000000000000000000
    yvel_____ -5.00000000000000000000
    y after_ 295.00000000000000000000
    y before 295.00000000000000000000
    yvel_____ -4.83333349227905273438
    y after_ 290.16665649414062500000
    y before 290.16665649414062500000
    yvel_____ -4.66666698455810546875
    y after_ 285.50000000000000000000
    y before 285.50000000000000000000
    yvel_____ -4.50000047683715820312
    y after_ 281.00000000000000000000

    This is insane whats going on ?

    It makes perfect sense. Floats carry about 7 decimal digits of precision. The extra digits you are printing with %.20f are meaningless. When rounded to 7 significant figures, these logs are quite right. If you do like RickSDK suggests and switch everything to doubles, you will get more precision - about 14 digits, I think. But even then things will not add up if you try to look beyond 14 digits of precision.
  • Re: How can I do Apple certification through I am beginner for iOS?

    You will get plenty of hits if you just google Apple certification. However you should realize that Apple certification is not necessary to develop apps for the app store. All that is necessary is that you sign up as a developer and pay Apple $99 per year. And of course that you somehow learn to develop iOS apps.