You can use iPhone speech synthesizer to announce runs of integration tests. Hear the sounds what will warm your heart every time. It shows that tests are working. Starting 13 test scenarios If you have Siri on your phone Siri’s voice will pronounce the phrases. VSSpeechSynthesizer could be found in XCode 4.4 in iOS PrivateFrameworks [...]
Tag Archives: Objective-c
What’s weird about floats in objective-c?
Aright, what’s up with this? This code using a double works just fine:
1 2 3 4 5 6 7 8 9 |
double myDouble = 2.2;
NSLog(@"myDouble %f", myDouble);
[self testDouble:myDouble];
- (void) testDouble:(double)myDouble {
NSLog(@"testDouble %f", myDouble);
} |
This code prints: myDouble 2.200000 testDouble 2.200000 No surprises there. But the same code using a float behaves very strangely:
1 2 3 4 5 6 7 8 9 |
float myFloat = 3.3;
NSLog(@"myFloat %f", myFloat);
[self testFloat:myFloat];
- (void) testFloat:(float)myFloat {
NSLog(@"testFloat %f", myFloat);
} |
This code prints myFloat 3.300000 testFloat 36893488147419103232.000000 So what happens to the float that is passed to the testFloat method? [...]
What's weird about floats in objective-c?
Aright, what’s up with this? This code using a double works just fine:
1 2 3 4 5 6 7 8 9 |
double myDouble = 2.2;
NSLog(@"myDouble %f", myDouble);
[self testDouble:myDouble];
- (void) testDouble:(double)myDouble {
NSLog(@"testDouble %f", myDouble);
} |
This code prints: myDouble 2.200000 testDouble 2.200000 No surprises there. But the same code using a float behaves very strangely:
1 2 3 4 5 6 7 8 9 |
float myFloat = 3.3;
NSLog(@"myFloat %f", myFloat);
[self testFloat:myFloat];
- (void) testFloat:(float)myFloat {
NSLog(@"testFloat %f", myFloat);
} |
This code prints myFloat 3.300000 testFloat 36893488147419103232.000000 So what happens to the float that is passed to the testFloat method? [...]
Objective-C Gets Blocks!
New to Objective-C is the block syntax. A block is a section of code that is grouped together and designed to be treated like one statement. Blocks also package up the lexical scope of variables and functions within its environment. Blocks are found in many languages including, but not limited to, Ruby, Javascript and Lisp. [...]
WWDC Day One
Apples annual conference kicked off last week and Blazing Cloud wasn’t about to miss it’s chance to attend. Many exciting things happened like a preview of the 4th generation iPhone, a preview of developer tools and a look into safari improvements. The keynote also offered up some interesting statistics and new device capabilities of iPhone [...]