Search Results

Search found 5 results on 1 pages for 'user313439'.

Page 1/1 | 1 

  • How could I pass the float number by value in obj-c?

    - by user313439
    - (void)applicationDidFinishLaunching:(UIApplication *)application{ // Override point for customization after application launch [window makeKeyAndVisible]; [self printFloat:1.3f]; } - (void)printFloat:(float)f { NSLog(@"%f",f); } I passed the "1.3f" to printFloat, but it was the wrong value (in this case, -2.000000) after "f" received. And there is a warning that "AppDelegate may not respond to -printFloat:" Where did I get it wrong? Thanks.

    Read the article

  • What's wrong with my self-defined init method?

    - by user313439
    In ClassA: - (ClassA *)initWithID:(NSString *) cID andTitle:(NSString *) cTitle { ClassAID = cID; ClassATitle = cTitle; return self; } In ClassB: - (void)cellDidSelected { ClassA *classAController = [[ClassA alloc] init]; //Program received signal: “EXC_BAD_ACCESS” when executing the following line. classAController = [classAController initWithClassAID:ClassAID andClassATitle:ClassATitle]; NSLog(@"I want to get the value of ID:%@ and Title:%@ here.", [classAController ClassATitle], [classAController ClassAID]) } Could anyone point where is wrong? Thanks a lot.

    Read the article

  • Change the width of the cell content

    - by user313439
    I want to change the width of the cell content. (see the pic) My code: CGSize contentViewSize = cell.contentView.bounds.size; contentViewSize.width = 20.0f; But there is no effect, what's wrong? Any suggestion will be appreciated, thanks.

    Read the article

1