Skip to content

Getting Runtime Error #2

Description

@jassionly4u

Hi,

I tried implementing this class but it is not running.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage imageWithTransparentBorder:]: unrecognized selector sent to instance 0x6c313f0'

Here is my code:

UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(self.view.frame.origin.x+40,         self.view.frame.origin.y+40, 200, 200)];
UIImage * c = [UIImage imageNamed:@"1.png"];


UIImage *xx =  [[UIImage alloc]initWithCGImage:[c CGImage]];


[xx imageWithTransparentBorder:3];
[img setImage:xx];
[self.view addSubview:img];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions